NGINX proxy_pass 返回 404

NGINX proxy_pass 返回 404

我有 Nginx 反向代理,它将请求代理到 NGINX 负载均衡器(Docker 容器)和其他 3 个虚拟机。除此虚拟机外,代理对所有虚拟机都运行良好。这是我的 sistes-available/default 文件:

server {




# support http and ipv6
#listen 80 default_server;
#listen [::]:80 default_server ipv6only=on;

# support https and ipv6
listen 443 default_server ssl;
listen [::]:443 ipv6only=on default_server ssl;

#listen 10.x.x.x:443;

client_max_body_size 100M;

#listen    [::]:80 ipv6only=on;

#listen 443;

#  ssl                on;
ssl_certificate           /etc/letsencrypt/live/local.teodesk.org/fullchain.pem;
ssl_certificate_key       /etc/letsencrypt/live/local.teodesk.org/privkey.pem;

ssl_prefer_server_ciphers on;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';



index index.html index.htm;

server_name local.teodesk.org;



location / {
    try_files $uri $uri/ =404;
}


    location /jenkins/ {
   proxy_set_header X-Real-IP  $remote_addr;
   proxy_set_header X-Forwarded-For $remote_addr;
   proxy_set_header Host $host;
   proxy_pass http://10.x.x.x:8080;
   }

location /artifactory/ {
   proxy_set_header X-Real-IP  $remote_addr;
   proxy_set_header X-Forwarded-For $remote_addr;
   proxy_set_header Host $host;
   proxy_pass http://10.x.x.x:8081;
}



location /passbolt/ {
   rewrite /passbolt/(.*) /$1 break;
   proxy_pass http://10.x.x.x:8082;
   proxy_set_header Host $host;
   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


}



location /teoapp/ {
   proxy_set_header X-Real-IP  $remote_addr;
   proxy_set_header X-Forwarded-For $remote_addr;
   proxy_set_header Host $host;
   proxy_pass http://10.x.x.x:8085;
   }

关键位置是/teo应用/

有人有想法吗?

谢谢

相关内容