XAMPP, Apache - Error: Apache shutdown unexpectedl

2019-01-02 19:25发布

I've just re-installed XAMPP, and when I try to start my Apache server in the XAMPP Control Panel, I now get the following errors:

16:50:25  [Apache]     Status change detected: running
16:50:26  [Apache]     Status change detected: stopped
16:50:26  [Apache]     Error: Apache shutdown unexpectedly.
16:50:26  [Apache]     This may be due to a blocked port, missing dependencies,
16:50:26  [Apache]     improper privileges, a crash, or a shutdown by another method.
16:50:26  [Apache]     Press the Logs button to view error logs and check
16:50:26  [Apache]     the Windows Event Viewer for more clues
16:50:26  [Apache]     If you need more help, copy and post this
16:50:26  [Apache]     entire log window on the forums

How do I solve this?

标签: apache xampp
30条回答
泛滥B
2楼-- · 2019-01-02 19:46

I had the exact same error message as the OP, but my problem was not addressed by any of the existing answers. Many of the answers deal with conflicts on port 80, which I knew I did not have, since I had had localhost responding on port 80 very recently.

Turns out I had inadvertently changed ServerRoot when I intended to change DocumentRoot (stupid, I know), and though the new ServerRoot directory existed, it did not contain the configuration files and other stuff apache needed, which caused it to fail on startup. The error message probably addresses this scenario by the wording 'missing dependencies'.

On my Windows system, setting ServerRoot back to C:/XAMPP/apache solved the problem.

查看更多
路过你的时光
3楼-- · 2019-01-02 19:47

Best solution

open XAMPP control panel,click on config for Apache, then click on Apache(httpd.config).now in the text editor . ctrl+f --> find "Listen 80" and replace it with "Listen 8079" wtihout the quotations :) but now you have to use it like this http://localhost:8079/

P.S, I tried to change port settings for skype , stopping the Web Deployment Agent Service which I could not find in windows 10,cmd--> net stop http, and other methods but nothing worked except this .

查看更多
不流泪的眼
4楼-- · 2019-01-02 19:47

I had the same problem (on Windows 8.1), but I fixed it just by extracting to C:\ instead of C:\somefolder as I did at first. So the path to the control panel, for example, is now C:\xampp\xampp-control.exe

查看更多
像晚风撩人
5楼-- · 2019-01-02 19:50

I solved the problem with stopping the service "Web Deployment Agent Service". Open: System -> Computer Management -> Services -> Web Deployment Agent Service. Stop this service and starting XAMPP works. I think this is a service by MS Webmatrix.

(German: Systemsteuerung -> System und Sicherheit -> Verwaltung -> Dienste -> Webbereitstellungs-Agent-Dienst)

查看更多
永恒的永恒
6楼-- · 2019-01-02 19:52

Open Skype.

Tools -> Options -> Advanced -> Connection.

Disable the "Use port 80 and 443 for alternatives for incoming connections"

Sign Out and Close all Skype windows. Try restarting your Apache.

查看更多
姐姐魅力值爆表
7楼-- · 2019-01-02 19:52

Follow these steps:

  1. Open your XAMPP control panel then click its "Config"
  2. Choose the "Apache (httpd.conf)" and find this code below and change it into this one:

    #Change this to Listen on specific IP addresses as shown below

    #to prevent Apache from glomming onto all bound IP addresses.

    #Listen 0.0.0.0:80

    #Listen [::]:80

    Listen 80

    # Dynamic Shared Object (DSO) Support

    1. Save it (Ctrl + S)
    2. After that, go back to the XAMPP control panel and click its config again.
    3. Choose "Apache (httpd-ssl.conf)", find this code below, and change it again:

    # Note: Configurations that use IPv6 but not IPv4-mapped addresses need two

    # Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"

    #

    #Listen 0.0.0.0:443

    #Listen [::]:443

    Listen 443

    1. Save it (Ctrl + S)
    2. Then, click the "config" (note: above the netstat) and click the "service and port settings".
    3. Change "Main Port" to 8080 and "SSL Port" to 4433, then save it.
    4. Finally, go to the "control panel" -> "Programs & Features" -> "Turn Windows On or Off".
    5. Uncheck your "Internet Information Services", and then click OK.

Just wait for it and your computer/laptop will be automatically restart and try to open your XAMPP control panel again, and then start your Apache.

查看更多
登录 后发表回答