nginx 502 bad gateway after upstream port change
nginx 1.24 on Ubuntu 22.04 as a reverse proxy. We moved the upstream app from port 3000 to 3001. Updated the proxy_pass to http://127.0.0.1:3001 and reloaded. Now every request returns 502 Bad Gateway. error.log says: connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.1.4, upstream: http://127.0.0.1:3001/... The app is definitely listening on 3001 (curl localhost:3001 works). What is left?
4 replies