在Centos+nginx+wordpress环境停启动iptables 网站返回502
程序员文章站
2022-04-25 12:34:13
...
在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,求大神指教了!!!
网站环境: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
相关文章
相关视频
专题推荐
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
- 最新文章
- 热门排行
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论