Apache shutdown unexpectedly startup error Solution

Source: Internet
Author: User

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.

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.