Hi all –
I’ve been trying to set this up for a solid week, and am wholly out of ideas (and searching has thusfar turned up nothing).
This should be simple: a Docker container running on a Debian VPS, with nginx setting up a reverse proxy so I can use a subdomain.
The container basically works, and is accessible via http://[domain]:[port]
. However, going to the subdomain results in a 504/Gateway Timeout. From the VPS, running curl -vvv localhost:[port]
connects and sends the initial GET
request, after which it just hangs for awhile before failing with a message that Connection reset by peer
.
I’ve tried a different Docker image with the same result. Running curl
on localhost
from within the Docker container doesn’t show any errors. The nginx error logs show a 111: Connection refused
message if trying to access the subdomain from the web, but that’s it.
The main server on nginx, i.e. not the one for the subdomain, works fine.
Here’s the nginx config for the subdomain:
server {
index index.html index.htm index.nginx-debian.html;
server_name [subdomain.domain.com]; # managed by Certbot
location / {
proxy_pass http://localhost:5874;
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/[subdomain.domain.com]/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/[subdomain.domain.com]/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}server {
if ($host = [subdomain.domain.com]) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80 ;
listen [::]:80 ;
server_name [subdomain.domain.com];
return 404; # managed by Certbot
}
I’m really stumped. At this point I don’t even know where else to look for figuring out what’s wrong.
I’m exceedingly grateful for any suggestions y’all may have!