Home  >  Article  >  Database  >  How to solve Apache shutdown unexpectedly startup error? (Method introduction)

How to solve Apache shutdown unexpectedly startup error? (Method introduction)

不言
不言forward
2019-01-07 10:52:048243browse

This article brings you how to solve the Apache shutdown unexpectedly startup error? (Method introduction) has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

The error displayed when xampp starts is:

9:52:41 [Apache] Attempting to start Apache app...

9:52:41 [Apache] Status change detected: running
9:52:42 [Apache] Status change detected: stopped
9:52:42 [Apache] Error: Apache shutdown unexpectedly.
9:52:42 [Apache] This may be due to a blocked port, missing dependencies,
9:52:42 [Apache] improper privileges, a crash, or a shutdown by another method.
9:52:42 [Apache] Check the "/xampp/apache/logs/error.log" file

9:52:42 [Apache] and the Windows Event Viewer for more clues

This problem is relatively common. Usually ports 80 and 443 are occupied

cmd prints the following log by running apache/bin/httpd.exe:

(OS 10048) Usually each socket address (protocol/network address /port) is only allowed to be used once. : make_sock: could not bind to address 0.0.0.0:443
Or port 80 is occupied

(OS 10048) Typically each socket address (protocol/network address/port) is only allowed to be used once. : make_sock: could not bind to address 0.0.0.0:80 or [ : : ]:80

1. The fastest way is to modify the port number:

1. Port 443 is occupied and apache cannot monitor port 443. How to solve the problem?

In /xampp/apache/conf/extra/httpd-ssl.conf

Change Listen 443 to 444 (customizable)

2. Port 80 is occupied , apache cannot monitor port 80, how to solve it?

In /xampp/apache/conf/extra/httpd.conf

Change Listen 80 to 88 (customizable)

If vhosts is configured, please change httpd -Change the port in -vhosts.conf to 88 (the same port number as above)

2. The most direct method is to close the processes occupying ports 80 and 443:

1. Use netstat -ano in cmd to see if ports 80 and 443 of the machine are occupied ----- --This may be occupied by other programs such as iis, virtual machines, etc.
2. Print tasklist through cmd , find the process names occupying ports 80 and 443.
3.taskkill /pid port number Kill this process name, XAMPP can restart apache.

In summary, the first method is recommended, and the second method will be encountered more or less every time it is started.

The above is the detailed content of How to solve Apache shutdown unexpectedly startup error? (Method introduction). 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