Xiao Bai's confusion about Apache is caused by chkconfig-how to check whether the program has been installed/successfully installed

Source: Internet
Author: User

This article briefly describes Apache's idiot-level problems

1 Relationship between APACHE and httpd

According to the Internet, it is complicated. However, I prefer to believe that httpd is a single Apache process about the HTTP service. It means that httpd belongs to Apache, and Apache contains not only httpd.

2 chkconfig -- levels 235 httpd on

Httpd is started randomly when the running level is 2, 3, and 5.

(A little question about chkconfig: The Association caused by chkconfig-how to check whether the program has been installed/successfully installed)

3 manually start httpd

/Usr/sbin/httpd

/Etc/init. d/httpd start

Service httpd start

All three methods are supported.

4.KeyProblem --Firewall

Sometimes Apache is successfully started, but the client browser still cannot access it. It is best to turn off the firewall first. This is a simple but critical issue that many people have not said on the Internet. It is not done until you have consulted a master.

Service iptables stop

This command should be the same as/etc/init. d/iptables stop.

Or

VI/etc/sysconfig/iptables

Add the following line to allow the firewall to release port 80

-A RH-Firewall-1-INPUT-p tcp-M state -- state new-m tcp -- dport 80-J accept

Service iptables restart Firewall

 

Finally, access is successful.

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.