Troubleshooting the Apache Server Not Starting

This tutorial assumes XAMPP or AMPPS installed on a Windows XP machine with Service Pack 3.

The instructions should work for other versions of Windows, but no guarantee is made.

For non-Windows systems, the general causes and procedures should be the same, but adapted for whatever OS you are running.

It is frustrating to install the Apache Server (whether through a package like XAMPP or AMPPS or separately installed) and not have it work.

The most common reason is that some other application is using the ports needed by the Apache Server. These are port 80 (http) and port 443 (https).

To check this, we need to see what applications are using which ports.

Some images may be clicked for full sized versions.

Download a TCP Port Monitoring Application

1) Download CurrPorts from NirSoft. The download link is located near the bottom of the page (just above all the various language packs available for it):

2) You will be prompted to Open or Save the application. Saving is probably the better option. Remember where you saved it:

3) Open the download:

The next step assumes Windows is providing archiving functionality for you. If you are using some other application (like WinZip or IZarc) then the instructions will be different.

4) Click on File and select Extract all:

5) Click on Next:

6) Click on Next if you accept the location the files will be extracted to, otherwise, enter a different location to extract the files to:

7) Ensure the Show extracted files checkbox is checked and click on Finish:

8) Double-click on the CurrPorts application to launch it:

9) Windows may popup a warning dialog. Click Run. You may also click on the Always ask before opening this file checkbox to prevent this warning form appearing in future:

In future, you can simply go to the directory that the CurrPorts application is located and double-click on the icon to start it. You can also create a shortcut to it, if you like, or add it to your Start Menu.

Checking which Ports are in Use

CurrPorts shows a lot of information about which applications are using which port:

10) Locate the tab Local Ports and click on it to sort the ports in ascending order:

Locating Port Conflicts

With the ports sorted, you can now check to see which applications (if any) are using the following ports:

Port 80 (http): the Apache Server, in both XAMPP and AMPPS, uses this port to serve up web pages using the Hyper Text Transfer Protocol. The most common application using this port (aside from Apache Server) is the Microsoft Internet Information Server (IIS). In order for Apache Server to work correctly, you need to disable any application using this port, or configure it to use some other port.

Port 443 (https): the Apache Server, in XAMPP, uses this port to serve up web pages using the Hyper Text Transfer Protocol Secure. The most common application using this port (aside from Apache Server) is the Microsoft Internet Information Server (IIS). In order for Apache Server to work correctly, you need to disable any application using this port, or configure it to use some other port. The Apache Server in AMPPS does not use this port or protocol.

Port 3306: this port is used by the MySQL database. If some other application is using this port, then your MySQL database will not work. In order for MySQL database to work correctly, you need to disable any other application using this port or configure it to use some other port.

Instructions for disabling the IIS can be found here.

8 Comments

  • Rochonfuin says:

    Thanx for the info.
    I would add that those installing Xampp on Windows are lucky, because in the front-end Control Panel of Xampp you can find an option that will run a port checker, just after you realize the Apache or MySql servers cannot start. That way I found TeamViewer keeping main ports busy. I unistalled it and now I am a happy user. Good luck.

    • admin says:

      You’re welcome and thanks for the feedback.
      The comment about the port checker is only true with XAMPP 1.7.3 since 1.7.4 and 1.7.7 don’t come with it.

  • fazal says:

    i tried it but still apachi give the following error:
    Warning: terminating worker thread 0
    plz help me.

    • admin says:

      Which version of XAMPP are you using? Which version of Windows are you running?
      Do you have anything running on port 80 or 443?
      Entering the error message Warning: terminting worker thread 0 in Google turns up lots of results.
      This result is for XAMPP 1.7.7 running on Windows XP 64 bit.
      I don’t maintain or develop Apache Server, I just try to provide help where I can. If you continue to have problems, your best bet would be to try one of the Apache forums. When you ask for help, include the following information:
      (1) version of XAMPP
      (2) version of Windows
      (3) the last few entries from the error.log file (the file can be found in \xampp\apache\logs)
      I tried blocking the port with another application, but I don’t get that error message. I suspect you might have some other issue than a blocked port.

  • fazal says:

    thanks admin I m now using vampp instead of xampp it works realy good.

    • admin says:

      I tried looking for VAMPP but couldn’t find it. Did you mean WAMPP instead?
      Anyway, I am glad you were able to resolve your problem.

  • dolly says:

    hi
    i am trying to install xampp on a windows 2008 server i have done like 3 installations and still it doesnt work. on the cpanel it says apache started but the running status does not come up even after changing ports and all in the conf file. when i typr in the url http:/localhost:8080 it says there are some files needed to be installed to make the website seen i dont get it at all. av done everythin you suggested but stil nothing.
    please help

    • admin says:

      I don’t have Windows 2008 Server, but …
      (1) Why are you entering localhost:8080? You would only do this if you changed the port numbe. By default, Apache uses both ports 80 and 443 (non-secure and secure http ports).
      Have you installed currports? Does it show other applications using port 80, port 443 and port 3306 (MySQL)?
      My best guess would be that Windows 2008 Server is running Microsoft IIS (Internet Information Server) and this is preventing Apache from running.
      I am surprised that you are getting error messages about missing files. One other possibility is that you installed XAMPP in C:\Program Files. On Windows 7, this will cause problems because Windows blocks some programs from running there – it may be the same on Windows 2008 Server.
      As well, which version of CAMPP Are you running? I prefer XAMPP 1.7.3 because I’ve never had any problems with it. XAMPP 1.7.4 and 1.7.7 cause me grief. You can find instructions for installing XAMPP 1.7.3 over here.
      If worse comes to worst, you can always try installing AMPPS instead – although, AMPPS does not provide a secure port (443).

Leave a Reply

Your email address will not be published. Required fields are marked *