By Dragan Kidovic


2013-07-03 05:59:41 8 Comments

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 & System.

I know by using a different port (such as port 8080 etc change in httpd.conf) will get to a workaround for this issue. However I need port 80 to be released by PID 4 process and allocated to Apache service. I have done that in the past but have forgotten the resolution steps over the time. Please help me fix it

This is the error I am encountering while starting Apache

`11:19:52 AM  [Apache]  Error: Apache shutdown unexpectedly.`
`11:19:52 AM  [Apache]  This may be due to a blocked port, missing dependencies,` 
`11:19:52 AM  [Apache]  improper privileges, a crash, or a shutdown by another method.`
`11:19:52 AM  [Apache]  Press the Logs button to view error logs and check`
`11:19:52 AM  [Apache]  the Windows Event Viewer for more clues`
`11:19:52 AM  [Apache]  If you need more help, copy and post this`
`11:19:52 AM  [Apache]  entire log window on the forums`

Logs from apache error log file:

[Wed Jul 03 00:54:17.004882 2013] [mpm_winnt:notice] [pid 248:tid 240] AH00354: Child: Starting 150 worker threads.
[Wed Jul 03 01:17:37.485351 2013] [mpm_winnt:notice] [pid 4200:tid 228] AH00428:    Parent: child process 248 exited with status 1073807364 -- Restarting.
[Wed Jul 03 08:51:45.875976 2013] [ssl:warn] [pid 400:tid 228] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:46.188476 2013] [core:warn] [pid 400:tid 228] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Jul 03 08:51:46.844726 2013] [ssl:warn] [pid 400:tid 228] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:49.047851 2013] [mpm_winnt:notice] [pid 400:tid 228] AH00455: Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16 configured -- resuming normal operations
[Wed Jul 03 08:51:49.047851 2013] [mpm_winnt:notice] [pid 400:tid 228] AH00456: Server built: Feb 23 2013 13:07:34
[Wed Jul 03 08:51:49.047851 2013] [core:notice] [pid 400:tid 228] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache
[Wed Jul 03 08:51:49.063476 2013] [mpm_winnt:notice] [pid 400:tid 228] AH00418: Parent: Created child process 5384
[Wed Jul 03 08:51:50.579101 2013] [ssl:warn] [pid 5384:tid 240] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:51.579101 2013] [ssl:warn] [pid 5384:tid 240] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:51.750976 2013] [mpm_winnt:notice] [pid 5384:tid 240] AH00354: Child: Starting 150 worker threads.

NOTE: I DO NOT HAVE IIS, WEB CLIENT, WORLD WIDE WEB SERVICE.

17 comments

@shrty 2014-01-20 14:19:13

You can disable port 80 and 443 as alternative incoming connections in Skype settings - Advanced settings - Connection.

disable alternative incoming connections
(source: ctrlv.in)

@Waqas Bukhary 2016-08-30 23:59:55

Your XAMPP restarting with following error at Multi-Processing Module mpm

 [mpm_winnt:notice] [pid 4200:tid 228] AH00428:    
`Parent: child process 248 exited with status 1073807364 -- Restarting.`

Add the following in the httpd.conf file of xampp to resolve this.

<IfModule mpm_winnt_module>
  ThreadStackSize 8388608
</IfModule>

@Hitesh 2018-08-11 05:15:37

you are right man! These mpm notices were caused due to small ThreadStackSize.And I faced some situations where the httpd.exe application was resumed by XAMPP but it was not responding to any requests after the unexpected shutdown of httpd.exe. Thank you for sharing such a great solution.

@evk1206 2015-10-07 17:41:00

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

@Esaith 2015-06-21 03:32:29

I shut down the computer and restarted after installing the software and that fixed my problem.

@Thiago Augustus Oliveira 2015-03-03 11:32:12

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.

@kimiberi 2013-08-22 13:18:13

Follow these:

  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
    
  3. save it (ctrl + s)

  4. after that, go back to xampp control panel and click again its config

  5. 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
    
  6. save it (ctrl + s)

  7. then, click the "config" (note: above the netstat) and click the "service and port settings" then save both of it.

  8. finally, go to the "control panel" -> "Programs & Features" -> "Turn Windows On or Off".

  9. Uncheck your "Internet Information Services" then click ok.

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

@Mustafa 2014-04-08 15:33:36

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)

@Rob Baillie 2014-04-08 15:56:40

Can you add an explanation to this answer?

@Truong Tran 2014-02-07 02:33:50

You shuld run file setup_xampp.bat in XAMP folder first!

@Byran Zaugg 2014-03-15 06:08:05

I tried all the above (Skype, Ports, IIS). This is what fixed it for me.

@tawa 2014-01-23 20:24:19

In my situation I had moved the htdocs to a new location updated in httpd.conf, which worked fine. I then received the same error after updating the httpd-vhost.conf file.

I found that the error was caused by a typo in the vhost configuration file. Previously I changed all "DocumentRoot" ’s to the new htdocs location, but had forgot to update the new location for "ErrorLog". After correcting the missing path, Apache was running smooth again.

@Lynnell Emmanuel Neri 2017-01-12 15:39:09

Yup, the same thing also happened to me. It will error if the directory is incorrect.

@user3210452 2014-01-18 17:54:26

If you are using the latest Skype, go to:

Tools -> Options -> Advanced -> connection.

Disable the 'Use port 80 and 443 for alternatve.. '
Sign Out and Close all Skype windows. Try restart your Apache again.

@LahiruBandara 2015-05-10 05:31:02

Short and Sweet :P

@user3183404 2014-01-10 20:42:14

This problem may occur because of skype installation in the system. Skype and apache service always conflict. Make sure your skype is not started before starting xampp.

@Paul Gobée 2015-09-15 17:13:31

This one worked for me. Simply quit Skype and XAMPP/Apache worked again. Thanks!

@shawon 2013-12-27 19:39:19

Stop the IIS service. It should work then

@innermond 2013-12-05 11:27:03

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>

@WhutMao 2013-11-15 12:49:44

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

I uninstalled IIS for using Apache httpd.

@chiapa 2013-08-12 15:38:44

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.

@abhinav 2014-03-09 16:20:16

It worked for me . thanks a lot :) . mark this as answer. that would be helpful to many others.

@Yoric 2014-06-25 20:52:15

Worked for me. Should be accepted as correct answer.

@dan983 2014-07-15 20:36:06

This worked for me too.

@VGupta 2014-10-23 17:46:27

@chiapa this worked for me too, thanks!

@BritishSteel 2015-09-16 07:41:42

This should be the marked answer; worked very fine!

@Zubli Quzaini 2016-03-13 16:19:28

My Savior, your deserve my thumbs up!

@pudaykiran 2013-07-24 05:31:42

It means port 80 is already used by another one.

Simply follow these steps:

  1. Open windows -> click on Run (win + R) -> type services.msc
  2. Goto IIS Admin -> Right click on it and click on Stop Option.
  3. Open XAMPP click on Start Action of Apache Module, Apache Module is run.

OR

For find the port of Apache (80) in Command Prompt simply type netstat -aon it displays present used ports on windows, under Local Address column it shown as 0.0.0.0:80. If it displays this port another connection is already used this port number.

Active Connections in Windows XP:

Active Connections in Windows XP

I solved my problem after installing xampp-win32-1.6.5-installer previously I used xampp version xampp-win32-1.8.2-0-VC9-installer at that time I got this error. Now it resolved my problem.

@Dragos Rizescu 2013-08-02 00:28:48

It's strange because I am getting the same error as in the question. However, I did set up VirtualHost in "C:\xampp\apache\conf\extra\httpd-vhosts.conf", which, to be honest has no logic for giving the error. Anyway, I thought that something was holding up the port so I basically did what you did and I had my port 80 free. Nevertheless, if I undo what I didn in httpd-vhosts.conf it apache starts like a charm. Anyway, here's what I am trying to do: samminds.com/2012/07/…

@Dragan Kidovic 2013-08-09 22:54:22

@udaykiran pulipati: Thanks for your answer. I think you are right that the version 1.8.2 has this issue.. I know the process (PID 4 - NT Kernel & System) is using port 80 and I am unable to flush this port so that apache can use it. However I have configured Apache to use port 8080 but that is just a work around and not the exact solution for it.

@Ali Almoullim 2013-07-03 06:03:17

i think the error is here

[pid 5384:tid 240] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name

or there is another app are using the port 80 try restarting your computer and only opening apache and see what happens

or try on reinstalling apache or using Ampps

@Dragan Kidovic 2013-07-03 06:26:18

Dev : I have tried both restarting the machine as well as Apache or XAmmps. But to no luck :( :( I will try reinstalling XAMMP.

Related Questions

Sponsored Content

2 Answered Questions

xampp does not run web pages for htpdocs

  • 2015-08-10 06:49:10
  • hobbit
  • 1155 View
  • 0 Score
  • 2 Answer
  • Tags:   php apache xampp

1 Answered Questions

[SOLVED] Couldn't start apache in xampp

  • 2015-11-12 04:16:58
  • Sriya
  • 1727 View
  • 0 Score
  • 1 Answer
  • Tags:   php apache ssl

1 Answered Questions

PHP dies unexpectedly without error

  • 2013-05-07 00:38:18
  • Stephen Bunch
  • 1424 View
  • 0 Score
  • 1 Answer
  • Tags:   php

Sponsored Content