Nginx 502 bad gateway

Moebuntu

Well-known member
Registered
Joined
Jul 1, 2016
Messages
103
Points
18
I have just installed Nginx on a small VPS server and when I try to view a PHP page then I got this error: 502 Bad Gateway.

Nginx 502 bad gateway.png

Anyone know what is it and how to fix it? where cab I check it came from?
 

manoaratefy

Well-known member
Hosting Provider
Registered
Joined
Sep 15, 2016
Messages
127
Points
18
Good morning!

With my reverse proxy, it was a socket issue. I recommend you to check if your PHP is really listening on a CGI port and if your NGINX is looking on the good CGI port.
 

isix

Isix Hosting Services
Hosting Provider
Registered
Joined
Feb 21, 2017
Messages
257
Points
18
The PHP-FPM has to be installed, running and listening on port 9000.
 

Matt Eberlie

Member
Registered
Joined
Mar 21, 2017
Messages
60
Points
0
when I installed my wordpress server on my hosting, It's working perfectly but after few days I got 502 bad gateway. I restarted my server and got my application back this work for me.
 

dnsme

Active member
Hosting Provider
Registered
Joined
May 20, 2017
Messages
82
Points
8
Respectively Try the following steps.
1-chown webapps:nginx /var/www
2-bufferAND timeout edited and restart nginx
3-Unable to connect PHP-FPM
 
Latest Threads
Replies
0
Views
117
Replies
0
Views
65
Replies
0
Views
57
Replies
1
Views
87

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top