在Centos+nginx+wordpress環境下啟動iptables 網站返回502
網站環境:Centos nginx php(wordpress)
現在的問題總結如下:
啟動iptables網站返回502,關閉iptables網站開啟正常
iptables 設定如下:
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
開啟了lo,開啟了80,開始了9000
在開啟iptables時,靜態網頁時能開啟的,但是切換回wordpress是又返回502.
查看error-log都是:
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"
我考慮是iptables的問題,是fastCGI用的9000連接埠沒有開啟,,但是我已經配置上了,為什麼還是返回502,求大神指教了!!! iptables nginx fastCGI
分享到: