Nginx was configured as reverse proxy for an upstream server that servers a website. Upon checking the setup I encountered the 502 Bad gateway error. In Nginx error.log I found the following line:
1 |
*1 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: , request: "GET /check HTTP/1.1", upstream: "http://127.0.0.1:4005/check", host: "example.com" |