502 bad gateway but nginx status is running ok

I'm a noob.
I just installed nginx and status check says "active (running)".
However, the URL is saying "502 Bad Gateway/nginx/1.24.0 (Ubuntu)"

I've looked at the basic troubleshooting guides but they seem to not be useful after discovering that nginx appears to be running.

I'm not sure what to do now?
Any ideas?
Thank you :)

1 Reply

Looks like one of your domains fully resolves while another seems to resolve to a 403 error, so… progress? :)

In general, a 502 error means that NGINX is running and processing inbound requests but is unable to connect with the destined backend service associated with that request. In context of a web server, this can often mean that PHP or another dependency has crashed or is not running following a reboot/system upgrade.

For more information about 502 errors in general, I'll include our Community post for reference:

Now, on to the 403 error - this signifies that NGINX does not have appropriate permissions to access the files your server block is designated to serve. For more information on how you can update permissions then restart NGINX, these Community and StackOverflow posts should point you in the right direction:


Please enter an answer

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