安装apache服务器时遇到只能本地访问,局域网内其他电脑不能访问apache:

安装apache服务器时遇到只能本地访问,局域网内其他电脑不能访问apache:
1.查看selinux运行状态及关闭selinux
/usr/sbin/sestatus -v
文本模式关闭selinux:
vi /ect/selinux/config
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:SELINUX=disabled
保存,reboot system!!!
用命令setenforce可以修改Current mode,不能关闭selinux。
但是依然不能访问apache;
2.查看防火墙状态:
service iptables status
service iptables stop
3.重启apache服务后,其他电脑可以访问apache了。
4.chkconfig iptables off 关闭防火墙功能

原文地址:https://www.cnblogs.com/xiaoping-2014/p/4457943.html