Start the iptables site in the Centos+nginx+wordpress environment to return 502

Site environment: Centos nginx php(wordpress)

The question now is summed up as follows:
Start the iptables website returns 502, close the iptables website open normal

Iptables settings are as follows:
Chain INPUT (policy DROP 1 packets, 139 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- lo any anywhere anywhere
17 1460 ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
1 40 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:mysql
2 80 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http
0 0 ACCEPT all -- lo any anywhere anywhere
0 0 ACCEPT icmp -- any any anywhere anywhere
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:pptp
0 0 ACCEPT gre -- any any anywhere anywhere

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 16 packets, 4024 bytes)
pkts bytes target prot opt in out source destination
2 80 ACCEPT tcp -- any any anywhere anywhere tcp spt:http

Open lo, opened 80, started 9000

In the open iptables, static webpage can open, but the switch back to the WordPress is returned 502

To view the error-log are:
2013/09/26 01:45:37 [error] 1745#0: *106 recv() failed (104: Connection reset by peer) while reading response header from upstream, client:, server: xiaobuxun.me, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xiaobuxun.me", referrer: "http://xiaobuxun.me/wp-admin/post-new.php"

I think the problem is the iptables, is the 9000 port for fastCGI is not open, but I already, configuration, or why the return of 502, and great advice.!!!

Started by Ashbur at October 30, 2016 - 9:27 PM

I didn't speak to me.? ? ?

Posted by Ashbur at October 31, 2016 - 9:58 PM

Php-fpm log, have a look.

Posted by Clyde at November 07, 2016 - 10:07 PM

Reference resources

Posted by Clyde at November 20, 2016 - 11:05 PM

I mounted on top of the CentOS
LNMP one click installation V1.0 release
Direct installation is very convenient

Posted by Daisy at December 01, 2016 - 11:46 PM