nginx配置成功后无法访问的问题
2018-01-29 本文已影响0人
wiseacre1996
CentOS7 默认采用的是firewall作为防火墙。
这里需要开通一些防火墙端口需要开通服务:
yum -y install iptables service
然后编辑文件vi /etc/sysconfig/iptables
开通80端口, 加入:
-A INPUT -p tcp -mstate --state NEW -m tcp --dport 80 -j ACCEPT
CentOS7 默认采用的是firewall作为防火墙。
这里需要开通一些防火墙端口需要开通服务:
yum -y install iptables service
然后编辑文件vi /etc/sysconfig/iptables
开通80端口, 加入:
-A INPUT -p tcp -mstate --state NEW -m tcp --dport 80 -j ACCEPT