相同域名不同端口的两个网站,分别使用了nginx代理都是通过location去匹配的,站点1的location / 站点2的location code/login 访问结果站点2的静态资源访问不到?
站点1 conf配置:
location / {
root /xxxxxx/pinpoint-web-1.8.1;
index index.html index.htm;
auth_basic "Input Password:";
auth_basic_user_file "/usr/local/nginx/pass";
proxy_pass https://xxxxxxx:8444/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
站点2 conf配置:
location /code/login {
root /xxxxx/core;
index login.html index.html index.htm;
proxy_pass https://xxxxxx:8443/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}