CentOS 6.5 cannot be accessed after the Apache server is installed

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.