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 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:

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:

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.