Solution to Linux httpd startup failure

Source: Internet
Author: User
Solution to Linux httpd startup failure-Linux Enterprise Application-Linux server application information. The following is a detailed description. Red Hat Linux enterprise 5

Start httpd faild

Linux httpd: httpd starts failed

I encountered this problem in the Virtual Machine. After trying many methods, I couldn't start it. Later I found that the problem lies in a file named httpd. conf in the/etc/httpd/conf/directory. There is another httpd in the same directory. conf. bak, as long as the httpd. conf. bak content replication httpd. in the conf file, overwrite the original content and start it. Run service httpd start in shell. We are pleasantly surprised to find that start httpd OK. Start httpd.

Use service httpd status to check whether httpd is running. Feeling comfortable. Although it's just a beginner's problem, hey, but I still write it down. Maybe this problem may be helpful for a newbie. Later, I checked in detail what caused the problem. The result is unexpected. The [system]-[management]-[server settings]-[HTTP] tool was used for setting, and then saved and imported. After using this tool, the configuration content is quite different from the initial setting.

I found that modifying the/etc/httpd/conf/httpd. conf file can solve the problem:

1. comment out the ServerName line, that is, add a # sign at the beginning of the line.

2. Complete the ServerAdmin line. For example: ServerAdmin admin@example.com

3. Correct the file path of the Lockfile, or comment out all of them (add at the beginning of the line #)

4. Load module .........

Loadmodule .........

... # There are many lines. Omitted! In fact, these errors are caused by HTTP code problems. We replace it with an initial file.

Loadmodule... Chinaz ^ com

Replace the corresponding content in/etc/httpd/conf/httpd. conf. bak.

The content is as follows:
QUOTE:

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.