When XAMPP is started, the following error occurs:
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 common. ports 80 and 443 are usually occupied.
CMD runs Apache/bin/httpd.exe to print the following log:
(OS 10048) Generally, each socket address (Protocol/network address/port) can be used only once. : Make_sock: cocould not bind to address 0.0.0.0: 443
Or port 80 is occupied.
(OS 10048) Generally, each socket address (Protocol/network address/port) can be used only once. : Make_sock: cocould not bind to address 0.0.0.0: 80 or [:]: 80
1. The fastest solution is to modify the port number:
1. If port 443 is occupied and Apache cannot monitor port 443, how can this problem be solved?
In/XAMPP/Apache/CONF/extra/httpd-ssl.conf
Modify listen 443 to 444 (customizable)
2. If port 80 is occupied and Apache cannot listen to port 80, how can this problem be solved?
In/XAMPP/Apache/CONF/extra/httpd. conf
Modify listen 80 to 88 (customizable)
If vhosts is configured, change the port in the httpd-vhosts.conf to 88 (same as the port number)
2. the most direct method is to close the process that occupies ports 80 and 443:
1. Run netstat-ano in cmd to check whether ports 80 and 443 of the local machine are occupied ----- -- this may be occupied by other programs, such as IIS and virtual machines.
2. Print tasklist in cmd to find the process name that occupies ports 80 and 443.
3. Kill the taskkill/PID port to kill the process name. Restart Apache by using XAMPP.
To sum up, we recommend that you use the first method. The second method is more or less encountered at each startup.