售前咨询
技术支持
渠道合作

iptables防火墙导致nginx不能访问的解决办法 – Nginx

虚拟机里nginx可以访问,但外部不能访问,解决方法:

vim /etc/sysconfig/iptables
添加 -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

然后执行(即时生效,重启失效):
service iptables stop
service iptables start

重启后生效
chkconfig iptabels on
chkconfig iptabels off

上一篇:

下一篇:

相关文章