CentOS 6.5 cannot be accessed after the Apache server is installed. Similar symptoms are described in references, but the solution is slightly modified.
In article 1, we recommend that you add rules to the firewall to enable port 80. The method is as follows:
========================================================== ==============================================
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT
========================================================== ==============================================
According to the test, in section 6.5, the rule writing method is invalid. Refer to the method in iptables and modify it
========================================================== ====================
-A input-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT
========================================================== ======================
Restart the firewall to solve the problem.
Troubleshooting process:
1. Check whether netstat-l is enabled on port 80.
2. Check whether httpd provides the service curl http: // 127.0.0.1
Refer:
References 1: After CentOS 5.2 is installed on the Apache server, it cannot be accessed by the solution.
The main reason is the Firewall:
Run the/etc/init. d/iptables status Command to check whether port 80 is enabled. If port 80 is not enabled, you can use either of the following methods:
1. Modify the vi/etc/sysconfig/iptables command to add the firewall to open port 80
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT
2. Disable the Firewall
/Etc/init. d/iptables stop
# Start
# Restart
Permanently disable the firewall chkconfig -- level 35 iptables off