因為接着檢查了服務器端的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