关于nginx配置成功后,无法访问的问题

转载:https://blog.csdn.net/lulen0724155075/article/details/51789164 

接着检查了服务器端的80端口是否可以访问的到 ,如果访问不到,那么就是防火墙的问题。

   做如下处理:

[root@localhost ]# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
[root@localhost ]# /etc/init.d/iptables save
[root@localhost ]# /etc/init.d/iptables restart

   至此,OK了,主机已可访问虚拟机的nginx服务