PHP Apache Shutdown unexpectedly startup error explanation and solutions

Source: Internet
Author: User
When learning PHP, accidentally found that the XAMPP Windows Apache startup error, the following error message appears:

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 is 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, usually 80, 443 ports are occupied

CMD prints the following log by running Apache/bin/httpd.exe:

By running CMD, enter the command line netstat-a to see all the ports that are occupied, such as:


It is known that 443 of the port is occupied, causing Apache to not start properly;


The solution is as follows:


(OS 10048) is typically used only once per socket address (Protocol/network address/port). : Make_sock:could not bind to address 0.0.0.0:443
or 80 ports in the back.

(OS 10048) is typically used only once per socket address (Protocol/network address/port). : Make_sock:could not bind to address 0.0.0.0:80 or [::]:80

The quickest way to deal with this is to modify the port number:

1, 443 port is occupied, Apache can not listen to 443 port, how to solve it?

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

Change Listen 443 to 444 (customizable)


2, 80 port is occupied, Apache can not listen to 80 port, how to solve it?

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

Change Listen 80 to 88 (customizable)

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


Two, the most direct method is to close the 80, 443 ports of the process:
1. Through the cmd Netstat-ano look at the machine 80, 443 port is occupied no-------here may be occupied by other programs such as IIS, virtual machine, etc.
2. Find the process name that occupies 80, 443 ports by printing tasklist in CMD.
3.taskkill/pid port number to kill this process name, xampp restart Apache.

In summary, the first method is recommended, and the second one is more or less encountered each time it starts.

  • Related Article

    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.