Problem starting Apache/IIS on Windows 7 Port:80

Recently I had severe problems running Apache on Windows 7. There are several reasons why this can happen. I have identified 5. The problem and the solution(s) are presented in this blog post.

You might come across this problem if you’re having trouble starting Apache or IIS. The first thing you should do is to go check your error logs. First thing to do is to go to your system event log. Do Start>[Type “event viewer”]>[Enter]. Select ‘System’ from the left side and check for any logs.

With Apache I was getting a service-related error code: -1

Now I checked the apache error log (C:\xampp\Apache\logs\error.log) and saw that it was ‘not able to bind to port 80’. This means that some other process was using port 80. So, I googled for a command to check the process that’s using port 80. The command was:

netstat -ano

Now if your process id (last column) that’s using port 80 [::]:80 or 0.0.0.0:80 is not 4 (PID), then your solution could be simple:

Solution 1

If your PID is not 4 after the above step, go to Task Manager>Performance>Resource Monitor. Here find the process that was using port 80 and kill it. 🙂

Solution 2

If the process that stole your port 80 was Skype, use this link: http://www.mydigitallife.info/2008/12/03/disable-skype-from-using-opening-and-listening-on-port-80-and-443-on-local-computer/

Solution 3

If PID 4 (The NT kernel process ‘System’) was hogging port 80. Go to your Service Control Manager (Type in ‘Services’ in Start Menu), Find the service named ‘RemoteDesktopManager’ and disable it.

Solution 4

Again if it was PID 4, there could be a problem with the infamous http.sys. To solve this problem, use this link: http://www.cameroncooke.com/2009/01/25/windows-7-uses-port-80-and-makes-it-impossible-to-install-apache-solution/

Solution 5 (This was my problem actually)

If you are running SQL Server Reporting Services, you’d be surprised to know that it steals your port 80. If you have SQL Server (05/08) installed on your system, goto Start > Microsoft Sql Server 20xx > Configuration > Sql Server Configuration Manager. Find the Reporting services and stop it. Also make it ‘Manual’ to be safe.

And Viola! My apache service is running. If it was IIS in your case, you’d have that running too 🙂

If this didn’t help you, comment. If this did help you, comment.

9 Replies to “Problem starting Apache/IIS on Windows 7 Port:80”

  1. This will greatly help troubleshoot the IIS/Apache issues by self instead of waiting for any administrator to resolve.

    Good work!!! 🙂

  2. Thank you so much for posting this. It saved me from going insane after a day of research. Solution 5 worked for me.

  3. thanks for tips. great job.

    can you give some tutorial in very2 1st step how to install joomla /IIS in window 7 ultimate?

    most of the tutorial only start install wamp/xampp perfectly without showing the exactly how to solve that problem port 80 and the other problem when installing Apache .but in my case i have already install apache successfully running but as i concern that IIS and Apache share same port 80. does that problem affect later? i mean when designing website or using joomla later on . because i do not want to waste my time to redo the work again and again

    if you dont mind can you give the step from the very beginning how to install Apache i my email . im really confused because too much information on the internet in diffrerent version.

    after i try install apache . it works but i dont where to put folder joomla after i unzip it .im using IIS in my computer so is it in C:/inetpub/wwwroot to put that joomla folder?

    i hope you can help me because im still beginner.

  4. My PID was 4; In my case it was MS Web Deploy, which uses port 80. I uninstalled it, though there are other options if you need that. You helped me get to the root of port 80 usage quickly; much thanks. (and Skype, too)

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.