How do I debug 502 Bad Gateway errors? There is one topic in the Q&A section here, there is one part of one page in the docs here which lists some possibilities, but doesn’t help if your problem is not one of those.
FWIW, I am working on 2 apps in a single project, each of which is a static site, so it should be quite simple.
I am somewhat surprised at the paucity of information on it. Is there a log, or some way I can see, “this is what the system is doing,” so it actually is possible to work through the error?
I did find the logs information in the docs, and figured out from the logs that nginx is serving, so I was able to find nginx.conf, but it didn’t help much.
Despite it being a static site, the error.log is showing:
2022/11/15 09:26:53 [error] 203#0: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 18.104.22.168, server: , request: "GET /metal/ HTTP/1.1", upstream: "http://0.0.0.0:8888/metal/", host: "****.platformsh.site"
which itself is odd, since this is a static site. Wouldn’t it just serve it locally? When ssh into the container, I, too, cannot
curl localhost:8888, but that is not too surprising as nothing is running there.
Is there some magic invocation necessary for it to be static?