How to resolve HTTP/1.1 502 Bad Gateway

After linode maintainance my website is not working, getting error HTTP/1.1 502 Bad Gateway, how can i rectify this. i tried restarting , reloading nginx . but still same error. please help

2 Replies

It means that nginx is not able to connect to whatever is "the real thing" serving up your site's content …

… which may be Apache, or PHP-FPM, etc.

You are in fact getting a response from nginx - but it's complaining that it can't do its job of getting the page from "the back-end" and serving it up to your browser.

Your browser (working) <-> nginx (working) <-> back-end (trouble here)

Hopefully you know what exactly that back-end is - most commonly this would be php-fpm - and can check its status and/or restart or fix that.

restarting server by "cap production deploy:restart" fixed my issue

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct