Home >Operation and Maintenance >Apache >What to do if apache2.4 crashes after starting?

What to do if apache2.4 crashes after starting?

王林
王林forward
2020-07-03 17:36:095560browse

What to do if apache2.4 crashes after starting?

Problem restoration:

(Recommended tutorial: apache from entry to proficiency)

When downloading Apache in windows, It always fails to start, crashes all the time, and the Apache2 service cannot be started in the Windows service.

When starting the service in ApacheMonitor, a prompt appears: the requested operation has failed

Troubleshooting:

  • ##Check the firewall, it is closed;

  • Query port 80, use netstat-ano to check whether port 80 is used locally, and after checking, no port 80 is occupied;

  • apache's SRVROOT configuration is correct . (It may not only be SRVROOT, but also ServerName, DocumentRoot, etc. may need to be modified);

  • After each exclusion, try to install apache, run cmd as an administrator, and cd to the bin directory of apache , enter the command: httpd.exe -k install. If it cannot be started, the command line will prompt you with the error location.

Through investigation, it was found that the cause of the crash was incorrect configuration of the ${apache_home}/conf/httpd.conf file.

The downloaded apache24 compressed package (not the .msi installation program), and the default files of httpd.conf are all under c:/Apache24/. Therefore, a .conf file error occurs.

The above is the detailed content of What to do if apache2.4 crashes after starting?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete