CentOS The reason why the website cannot be accessed by other computers on the LAN

Source: Internet
Author: User
Tags centos iptables
After the CentOS configuration of Apache server, with other computers to access my site, there is no access to the situation, may have been caused by the cause.

1. First make sure that the computer can access, Linux does not like Windows to open the browser to access, in Linux we can use the Telnet command to see if 80 ports are open. The specific command is Telnet 192.168.115.129 80, as shown in the following illustration:

2. To see if Apache is set to allow other computer access, set the method to open the Apache configuration file, usually the path of the configuration file is:/etc/httpd/conf/httpd.conf, find "<directory"/var/www/html ">" To change the corresponding configuration to:

AllowOverride All

Order Deny,allow

Allow from all

After saving, restart the service.

3. If neither of the above is OK, try the following two lines to open access to port 80:

Iptables-i input-p TCP--dport 80-j ACCEPT

/etc/rc.d/init.d/iptables Save

So far, it should be done.
Related Article

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.