Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the failure of Linux httpd apache startup

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to solve the failure of Linux httpd apache startup". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the failure of Linux httpd apache startup.

Red Hat Linux enterprise 5

Start httpd faild

Linux httpd: httpd starts failed

I encountered this problem in the virtual machine and tried many ways to boot, but later found that the problem was that there was a file called httpd.conf in the / etc/httpd/conf/ directory. There is another one called httpd.conf.bak in the same directory. As long as you copy the contents of httpd.conf.bak into the httpd.conf file, overwrite the original content, you can start it. Run service httpd start in shell. Surprise, start httpd ok. Start httpd to confirm

With service httpd status, you can see that httpd is running. I feel good. Although it is only a very bad novice problem, hey, but I still write it down, maybe which novice also encounter this problem can help. Later, I checked in detail what led to the problem. The result was unexpected. It turns out that the [system]-[manage]-[Server Settings]-[HTTP] tool is used to set it, and then save it and import it to. After using this tool, there are a lot of settings that are different from the initial settings.

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

1. Comment out the line ServerName, that is, the line is preceded by a # sign.

two。 Write the ServerAdmin line completely. Such as: ServerAdmin admin@example.com

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

4. Loadmodule.

Loadmodule.

. # there are many lines here. Omit! In fact, these are all wrong, and should be caused by code problems in HTTP itself. We replace it with the initial file.

Loadmodule.

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

The contents are as follows:

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, which should start the httpd service. Use the command service httpd start in shell to start the service.

In addition, it should be noted that these are only a small part of the content, and many options are different from the initial httdp.conf. Please take a closer look at the enabled status of the relevant features and change them as needed.

At this point, I believe you have a deeper understanding of "how to solve the failure of Linux httpd apache startup". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report