[Reprinted with the source: Qian guozheng's column http://blog.csdn.net/qianguozheng/article/details/37611859]
Problem:
If Apache is installed on centos and the server is configured, the local machine can issue questions, but the IP address of the external LAN cannot issue questions.
Solution:
1. modify the configuration file/etc/httpd/CONF/httpd. conf.
<Directory "/var/www/cgi-bin">
AllowOverride none
Options none
Order allow, deny
Allow from all
</Directory>
2. Add port ing. This is the security feature of the centos system and is also the reason for its application to the server.
Method <1>: directly change the firewall configuration file (/etc/sysconfig/iptables)
-A input-p tcp-M state -- state new-m tcp -- dport 8080-J accept
-A input-p tcp-M state -- state new-m tcp -- dport 80-J accept
Method <2>: Command change
/Sbin/iptables-I input-P TCP -- dport 3306-jaccept
Save Configuration
/Etc/rc. d/init. d/iptables save
Restart the service
Service iptables restart
Or/etc/init. d/iptables restart
Check status
/Etc/init. d/iptables status
Start iptables manually:
Enable: chkconfig iptables on Disable: chkconfig iptables off
Disable the service using iptables:
Enable: Service iptables start Disable: Service iptables stop
Exam
[Http://tieba.baidu.com/p/1303031263]
[Http://www.server110.com/linux/201308/528.html]
[Http://www.2cto.com/ OS /201205/132884.html]
[Http://www.cnblogs.com/rockee/archive/2012/05/17/2506671.html]
[Reprinted with the source: Qian guozheng's column http://blog.csdn.net/qianguozheng/article/details/37611859]
Configure httpd for centos so that the LAN can be accessed normally.