# 502 Bad Gateway - Wordpress

**URL:** <https://www.ruby-forum.com/t/502-bad-gateway-wordpress/217154>\
**Category:** NGINX\
**Created:** [February 22, 2012, 9:33pm UTC](https://www.ruby-forum.com/t/502-bad-gateway-wordpress/217154 "2012-02-22T21:33:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 22, 2012, 9:33pm UTC](https://www.ruby-forum.com/t/502-bad-gateway-wordpress/217154/1 "2012-02-22T21:33:18Z")

</div>

Greetings,

I’m having another issue with my nginx + php-fpm + mysql install. I’ve  
been having a lot of issues today after fixing my previous one and I’ve  
finally decided that I am stumped on this one.

Ok, so I am trying to install WordPress on my server that I have nginx +  
php-fpm installed on but every time I navigate to  
[http://mydomain.com/wp-admin/install.php](http://mydomain.com/wp-admin/install.php) I recieve an error: 502 Bad  
Gateway. I checked out my error logs and I saw this:

2012/02/22 10:02:54 [error] 2801#0: \*114 recv() failed (104: Connection  
reset by peer) while reading response header from upstream, client:  
m.y.i.p, server: [mydomain.com](http://mydomain.com), request: “GET /wp-admin/install.php  
HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “[mydomain.com](http://mydomain.com)”

I have checked to see if php-fpm is running and is listening on port  
9000 and it is in fact running and listening. I can view phpinfo() pages  
just fine.

I did have my php-fpm set up to listen on a unix socket(?) and it was  
doing that so I switched back to TCP and it’s still doing it, I receive  
the same error for both of them only with the different upstream.

Any help would be greatly appreciate, I’ve had such troubles today…

Thanks,  
Jeremiah!

Posted at Nginx Forum:

> **[502 Bad Gateway - Wordpress](https://forum.nginx.org/read.php?2,222873,222873#msg-222873)**
>
> Greetings, I'm having another issue with my nginx + php-fpm + mysql install. I've been having a lot of issues today after fixing my previous one and I've finally decided that I am stumped on this one. Ok, so I am trying to install WordPress on my...

---

<div class="post-metadata">

**Author:** ![JerW](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@JerW](https://www.ruby-forum.com/u/JerW)\
**Post date:** [February 22, 2012, 10:25pm UTC](https://www.ruby-forum.com/t/502-bad-gateway-wordpress/217154/2 "2012-02-22T22:25:25Z")

</div>

I have since changed AGAIN from using the TCP port of 9000 to the unix  
socket.

Here is the new error line:  
2012/02/22 11:20:32 [error] 2504#0: \*26 recv() failed (104: Connection  
reset by peer) while reading response header from upstream, client:  
m.y.i.p, server: [mydomain.com](http://mydomain.com), request: “GET /wp-admin/install.php  
HTTP/1.1”, upstream: “fastcgi://unix:/tmp/php5-fpm.sock:”, host:  
“[mydomain.com](http://mydomain.com)”

Posted at Nginx Forum:

> **[Re: 502 Bad Gateway - Wordpress](https://forum.nginx.org/read.php?2,222873,222875#msg-222875)**
>
> Greetings, I'm having another issue with my nginx + php-fpm + mysql install. I've been having a lot of issues today after fixing my previous one and I've finally decided that I am stumped on this one. Ok, so I am trying to install WordPress on my...

---

<div class="post-metadata">

**Author:** ![JerW](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@JerW](https://www.ruby-forum.com/u/JerW)\
**Post date:** [February 22, 2012, 10:41pm UTC](https://www.ruby-forum.com/t/502-bad-gateway-wordpress/217154/3 "2012-02-22T22:41:31Z")

</div>

I am also receiving this error on another vhost that I have set up only  
that one is running Joomla. I am receiving the same exact error with  
this one only with the different domain name.

Posted at Nginx Forum:

> **[Re: 502 Bad Gateway - Wordpress](https://forum.nginx.org/read.php?2,222873,222878#msg-222878)**
>
> Greetings, I'm having another issue with my nginx + php-fpm + mysql install. I've been having a lot of issues today after fixing my previous one and I've finally decided that I am stumped on this one. Ok, so I am trying to install WordPress on my...

---

<div class="post-metadata">

**Author:** ![JerW](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@JerW](https://www.ruby-forum.com/u/JerW)\
**Post date:** [February 23, 2012, 5:46pm UTC](https://www.ruby-forum.com/t/502-bad-gateway-wordpress/217154/4 "2012-02-23T17:46:45Z")

</div>

Nevermind, I fixed this. Not sure how exactly but I am now able to serve  
php files just fine!!!

Posted at Nginx Forum:

> **[Re: 502 Bad Gateway - Wordpress](https://forum.nginx.org/read.php?2,222873,222903#msg-222903)**
>
> Greetings, I'm having another issue with my nginx + php-fpm + mysql install. I've been having a lot of issues today after fixing my previous one and I've finally decided that I am stumped on this one. Ok, so I am trying to install WordPress on my...

---

<div class="post-metadata">

**Author:** ![JerW](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@JerW](https://www.ruby-forum.com/u/JerW)\
**Post date:** [November 7, 2012, 4:00pm UTC](https://www.ruby-forum.com/t/502-bad-gateway-wordpress/217154/5 "2012-11-07T16:00:23Z")

</div>

Glad to hear it JerW. I’m having a similar problem now. If you don’t  
mind  
could you please share what you did to fix it ?

Posted at Nginx Forum:

> **[Re: 502 Bad Gateway - Wordpress](https://forum.nginx.org/read.php?2,222873,232578#msg-232578)**
>
> Greetings, I'm having another issue with my nginx + php-fpm + mysql install. I've been having a lot of issues today after fixing my previous one and I've finally decided that I am stumped on this one. Ok, so I am trying to install WordPress on my...
