Linux operating system startup httpd failure Solution

Source: Internet
Author: User
Tags linux

Red Hat Linux Enterprise 5

Start httpd faild

Linux HTTPD:HTTPD Boot failed

I encountered this problem in the virtual machine, tried a lot of methods can not start, and later found that the problem in the/etc/httpd/conf/directory there is a file called httpd.conf. In the same directory there is another called Httpd.conf.bak, as long as the contents of the Httpd.conf.bak copy httpd.conf file, covering the original content can be started, to run the shell service httpd start, surprise found, Start httpd OK. Start httpd OK.

With service httpd status you can see that httpd is running. Feel comfortable. Although it is a very good novice problem, hey, but I still write down, perhaps some novice also encounter this problem can help. Then I went through the details of what was the problem. It turned out to be unexpected. It was set up using the system]-[admin]-[Server Settings]-[http tool, then saved and then directed. After using this tool, there are more places in the setup content than the original settings.

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

1. ServerName This line to comment out, the first add a # number.

2. Will serveradmin this line to write complete. such as: ServerAdmin admin@example.com

3. Correct the Lockfile file path, or simply comment it out (start line plus #)

4. will be loadmodule ...

Loadmodule .....

.. #这里很多行. Omitted! In fact, these are all wrong, should be HTTP itself code problems caused. We replace it with the original file.

Loadmodule .....

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

The contents are as follows:

The following are the referenced contents:

LoadModule Auth_basic_module modules/mod_auth_basic.so

LoadModule Auth_digest_module modules/mod_auth_digest.so

LoadModule Authn_file_module modules/mod_authn_file.so

LoadModule Authn_alias_module modules/mod_authn_alias.so

LoadModule Authn_anon_module modules/mod_authn_anon.so

LoadModule Authn_dbm_module modules/mod_authn_dbm.so

LoadModule Authn_default_module modules/mod_authn_default.so

LoadModule Authz_host_module modules/mod_authz_host.so

LoadModule Authz_user_module modules/mod_authz_user.so

LoadModule Authz_owner_module modules/mod_authz_owner.so

LoadModule Authz_groupfile_module modules/mod_authz_groupfile.so

LoadModule Authz_dbm_module modules/mod_authz_dbm.so

LoadModule Authz_default_module modules/mod_authz_default.so

LoadModule Ldap_module modules/mod_ldap.so

LoadModule Authnz_ldap_module modules/mod_authnz_ldap.so

LoadModule Include_module modules/mod_include.so

LoadModule Log_config_module modules/mod_log_config.so

LoadModule Logio_module modules/mod_logio.so

LoadModule Env_module modules/mod_env.so

LoadModule Ext_filter_module modules/mod_ext_filter.so

LoadModule Mime_magic_module modules/mod_mime_magic.so

LoadModule Expires_module modules/mod_expires.so

LoadModule Deflate_module modules/mod_deflate.so

LoadModule Headers_module modules/mod_headers.so

LoadModule Usertrack_module modules/mod_usertrack.so

LoadModule Setenvif_module modules/mod_setenvif.so

LoadModule Mime_module modules/mod_mime.so

LoadModule Dav_module modules/mod_dav.so

LoadModule Status_module modules/mod_status.so

LoadModule Autoindex_module modules/mod_autoindex.so

LoadModule Info_module modules/mod_info.so

LoadModule Dav_fs_module modules/mod_dav_fs.so

LoadModule Vhost_alias_module modules/mod_vhost_alias.so

LoadModule Negotiation_module modules/mod_negotiation.so

LoadModule Dir_module modules/mod_dir.so

LoadModule Actions_module modules/mod_actions.so

LoadModule Speling_module modules/mod_speling.so

LoadModule Userdir_module modules/mod_userdir.so

LoadModule Alias_module modules/mod_alias.so

LoadModule Rewrite_module modules/mod_rewrite.so

LoadModule Proxy_module modules/mod_proxy.so

LoadModule Proxy_balancer_module modules/mod_proxy_balancer.so

LoadModule Proxy_ftp_module modules/mod_proxy_ftp.so

LoadModule Proxy_http_module modules/mod_proxy_http.so

LoadModule Proxy_connect_module modules/mod_proxy_connect.so

LoadModule Cache_module modules/mod_cache.so

LoadModule Suexec_module modules/mod_suexec.so

LoadModule Disk_cache_module modules/mod_disk_cache.so

LoadModule File_cache_module modules/mod_file_cache.so

LoadModule Mem_cache_module modules/mod_mem_cache.so

LoadModule Cgi_module modules/mod_cgi.so

OK, this should be able to start the httpd service, please use the command service httpd start in the shell to start the service

Also need to note that these changes only a small amount of content, many options have been different from the original httdp.conf, please look at the relevant features of the open state, as needed to change it.



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.