Report this

What is the reason for this report?

502 Bad Gateway

Posted on October 14, 2020

i have strapi configured on the server, everything seemed to be working well until now, gives the “502 Bad Gateway” error when i try to open it

i ran “tail -f /var/log/nginx/error.log” and got the following

2020/10/14 17:49:29 [error] 4295#4295: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 105.112.71.128, server: admin.lasubeb.lg.gov.ng, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:1337/favicon.ico", host: "admin.lasubeb.lg.gov.ng", referrer: "http://admin.lasubeb.lg.gov.ng/admin"
2020/10/14 17:49:29 [error] 4295#4295: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 105.112.71.128, server: admin.lasubeb.lg.gov.ng, request: "GET /admin HTTP/1.1", upstream: "http://127.0.0.1:1337/admin", host: "admin.lasubeb.lg.gov.ng"
2020/10/14 17:49:29 [error] 4295#4295: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 105.112.71.128, server: admin.lasubeb.lg.gov.ng, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:1337/favicon.ico", host: "admin.lasubeb.lg.gov.ng", referrer: "http://admin.lasubeb.lg.gov.ng/admin"



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The HyperText Transfer Protocol (HTTP) 502 Bad Gateway server error response code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.