ARTIFACTORY:推荐的Nginx反向代理配置ARTIFACTORY 7
相关版本:此信息适用于人工版本7。X及以上
在人工工厂7。x, a few changes were made regarding the reverse proxy configuration for Nginx. The correct snippet should now include the following: (make sure to change the colored fields according to your server)
###########################################################
这个配置是由JFrog Artifactory生成的
###########################################################
##服务器配置
服务器{
听80;
server_name < server_name >;
如果($http_x_forwarded_proto = ") {
设置$http_x_forwarded_proto $scheme;
}
特定于应用程序的日志
## access_log /var/log/nginx/
## error_log /var/log/nginx/
重写^/$ /ui/ redirect;
重写^/ui$ /ui/ redirect;
proxy_buffer_size 128 k;
Proxy_buffers 4 256k;
proxy_busy_buffers_size 256 k;
chunked_transfer_encoding;
client_max_body_size 0;
位置/ {
proxy_read_timeout 2400年代;
proxy_pass_header服务器;
proxy_cookie_path ~ * ^ /。* /;
proxy_pass http:// < SERVER_IP >: 8082;
$http_x_forwarded_proto://$host:$server_port;
proxy_set_header X-Forwarded-Port $server_port;
$http_x_forwarded_proto;
proxy_set_header $http_host;
$proxy_add_x_forwarded_for;
位置~ ^/artifactory/ {
proxy_pass http:// < SERVER_IP >: 8081;
}
}
}
发布日期:2020年12月28日
最后更新:2021年5月24日
关键词:Nginx,反向代理
