多个应用nginx配置
location ~^/crm-file/{
set $fixed_destination $http_destination;
if ($http_destination ~* ^https(.*)$){
set $fixed_destination http$1;
}
proxy_set_header Host $host;
proxy_set_header Proxy-Client-IP $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Cookie $http_cookie;
proxy_pass http://127.0.0.1:8180/$request_uri;
}
location / {
set $fixed_destination $http_destination;
if ($http_destination ~* ^https(.*)$){
set $fixed_destination http$1;
}
proxy_set_header Host $host;
proxy_set_header Proxy-Client-IP $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Cookie $http_cookie;
proxy_pass http://127.0.0.1:8080/;
}