Apache shutdown unexpectedly

前端 未结 17 1796
[愿得一人]
[愿得一人] 2020-12-13 20:27

I am using XAMPPS to host PHP files from my machine. I have recently installed XAMPPs but I am unable to start Apache service as port 80 is in use by PID 4 - NT Kernel &

相关标签:
17条回答
  • 2020-12-13 20:39

    That is because IIS is automatically running on your machine. IIS occupied both port 80 and 443.

    I uninstalled IIS for using Apache httpd.

    0 讨论(0)
  • 2020-12-13 20:39

    I have also faced the same issue while installing the XAMPP. The reason being the port 80 as configured in httpd.conf is already in use in other application (eg., in Skype). You can change the port value in httpd.conf to 8080 or other number. Click on config icon and open http.conf file. Search for 80 and do the following steps

    In httpd.conf change
    Listen 80 to Listen 8080
    and
    ServerName localhost:80 to
    ServerName localhost:8080

    You can check the ports used currently by clicking on netstatt icon in the XAMPP Control Panel

    0 讨论(0)
  • 2020-12-13 20:43

    Just change the port 80 to anything else like 8080(in httpd.conf), and port 443 to something else like 4433 (in httpd-ssl.conf)

    0 讨论(0)
  • 2020-12-13 20:46

    on your XAMPP control panel, next to apache, select the "Config" option and select the first file (httpd.conf):

    there, look for the "listen" line (you may use the find tool in the notepad) and there must be a line stating "Listen 80". Note: there are other lines with "listen" on them but they should be commented (start with a #), the one you need to change is the one saying exactly "listen 80". Now change it to "Listen 1337".

    Start apache now.

    If the error subsists, it's because there's another port that's already in use. So, select the config option again (next to apache in your xampp control panel) and select the second option this time (httpd-ssl.conf):

    there, look for the line "Listen 443" and change it to "Listen 7331".

    Start apache, it should be working now.

    0 讨论(0)
  • 2020-12-13 20:46

    I had a similar issue (that is the reason I come to this thread) that originated from a typo in httpd-vhosts.conf

    instead of <VirtualHost domain-name:80> I accidentally wrote (through copy-paste) as <domain-name *:80>

    0 讨论(0)
  • 2020-12-13 20:46

    Stop the IIS service. It should work then

    0 讨论(0)
提交回复
热议问题