0

I have this setup of NGINX as a reverse proxy.

server {
    listen 443 ssl;
    server_name site1.example.com;
    ssl_certificate /home/efwm/efwmsw/certificate/example.com.cer;  
    ssl_certificate_key /certificate/example.com.key;
    location / {
        proxy_pass http://127.0.0.1:8010;
    }
}

server {
    listen 443 ssl;
    server_name site2.example.com;
    ssl_certificate /certificate/example.com.cer;   
    ssl_certificate_key /certificate/example.com.key;
    location / {
        proxy_pass http://127.0.0.1:8020;
    }
}

server {
  listen 443 ssl;
  server_name site3.example.com;
  ssl_certificate /certificate/example.com.cer;
  ssl_certificate_key /certificate/example.com.key;
  location / {
          proxy_pass http://192.168.1.50:8000;
  }
}
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

For first two servers everything works fine but requests to third server get:ERR_CONNECTION_REFUSED. I add that the first two services are contained in docker on the same server where NGINX runs, while the third is an autonomous server. Nothing is written in the error log. Of course I tried calling the exposed service on the third server and it works. Any suggestion is welcome. Thank you

0 Answers0