How to solve httpd startup failure in Linux-Linux Enterprise Application-Linux server application information. 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 to start, and run service httpd start in shell.
Surprise, start httpd OK
Start httpd OK
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 .....
Replace the corresponding content in/etc/httpd/conf/httpd. conf. bak.
OK. In this case, you can start the httpd service. Use the service httpd start command in shell to start the service.
In addition, it should be noted that only a small part of the content has been modified, and many options have been followed by the initial httdp. conf is different. Please take a closer look at the activation status of related functions and change it as needed.
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.