The original post: /r/nginx by /u/SovietWaffles on 2024-06-28 22:24:28.

Hi all,

Today I upgraded my internet from Fios 1 Gbps -> 2 Gbps, which included a new router, the CR1000A. Transitioning everything has gone pretty well, with the exception of NGINX. Whenever I try to connect to my domain, I get a 502 Bad Gateway error.

Looking at the logs, it seems that it can’t seem to forward the connection to the relevant service:

2024/06/28 21:56:10 [error] 28#28: *1 connect() failed (111: Connection refused) while connecting to upstream, client: <my external ip>, server: <my domain>.com, request: "GET / HTTP/1.1", upstream: "https://<my external ip>:9988/", host: "<my domain>.com"

Nothing with my server set up changed except the router, so I’m pretty confused about what could be causing this. I confirmed that my ports are properly port forwarded (80 and 443), and I have set the server as a static IP in my router settings, and can still access it locally. I also confirmed that the DNS for the domain is pointing to the right IP.

The only thing I think it could be at this point is the SSL certs? They were last generated a month ago when I had the old router, and attempting to renew them failed because they aren’t expired yet.

Any help would be really appreciated here.

For context, NGINX and all of my other services are running in their own Docker containers on Fedora.

nginx.conf

nginx docker-compose.yaml