I am configuring Nginx (not in docker) to redirect a web service provider on localhost:9333 (which are placed in two docker containers). I could reach service through ssh, but when using the domain name on a web browser (I can ping with the domain name and it connects to the correct IP), the browser says "connection time out".
The nginx error.log says :"...[notice] 175385#175385: signal process started". I did not have a root file, I did only a proxy_pass.
Many thanks for help!
My nginx configuration is below:
'''server {
listen 80;
listen [::]:80;
server_name xxxx.xxx.xx.xx;
server_name_in_redirect off;
client_max_body_size 200m;
error_page 502 503 504 = @maintenance;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/nginx/ssl/my_server.crt;
ssl_certificate_key /etc/nginx/ssl/my.server.key;
ssl_prefer_server_ciphers on;
location / {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9333/;
sub_filter 'href="http://127.0.0.1:9333/' 'href="https://$host/';
}
location @maintenance {
expires 0;
add_header Pragma "no-cache";
add_header Cache-Control "no-cache, no-store, must-revalidate";
try_files $uri /50x.html =502;
}
}
'''