0

I have Nginx reverse proxy that proxies request to NGINX load balancer(Docker container) and 3 other Virtual Machines. Proxy works fine for all Virtual Machines, except this one. Here is my sistes-available/default file:

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;
   }

The critical location is /teoapp/

Anyone has an idea?

Thanks

Drifter104
  • 3,693
  • 2
  • 22
  • 39
Miodrag
  • 91
  • 1
  • 1
  • 4
  • A reverse proxy usually returns the errors generated by the back-end, check the logs there to find a reason for the 404 if the nginx logs don't give a reason... and compare what happens when you directly query the back-end, i.e. `curl -v http://10.x.x.x:8085` – HBruijn May 16 '18 at 10:43
  • @HBruijn When i run curl, or wget, it return the login page – Miodrag May 16 '18 at 10:47
  • And when i check nginx error.log file IT shows: " upstream prematurely closed connection while reading response header from upstream, client: 10.xx.72.89, server: local.teodesk.org, request: "GET /teoapp/ HTTP/1.1", upstream: "http://10.xx.xx.47:8085/", host: "local.teodesk.org"" – Miodrag May 16 '18 at 10:50

0 Answers0