因为接着检查了服务器端的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
查找防火墙的文件命令:
vim /etc/sysconfig/iptables
打开文件之后会有:-A INPUT -p -tcp -m --dport 80 -j ACCEPT 此为打开了80端口
修改之后重启:service iptables restart