Sometime back I was working on an incident with a customer who was facing an issue when trying to access his application on Windows Server 2008. I will reproduce the issue using Apache for everyone’s benefit.
If you have a server that has some kind of monitoring tool which is web based or some application which needs port 80 or port 443, then you can face this issue.
I am installing Apache 2.2.11 on my Windows Server 2008 machine which has IIS 7 installed on it. So, wondering why I am trying to install Apache on Windows Server 2008, simply because it’s a web server.
Checkout the screenshot below. Apache will be installed on Port 80 (default setting). Sometimes some application will silently get installed on your machine on port 80.
After sometime, I get the following error:
Checked the Event Viewer and I see the Event as shown below. Looks like Apache wanted to bind itself on 0.0.0.0:80 and fails as it does not have access.
Opened Command prompt as an Administrator and ran “netstat –ano”
I see port 80 is controlled by PID 4 i.e System.
Now, stopped IIS Services by firing “iisreset /stop”.
Started Apache 2.2 service from Services.msc and fired “iisreset” again.
Opened, IIS Manager and I see all websites on port 80 stopped.
Check the Event Viewer
Run “netstat –ano” and this is what I see:
PID 1256 or Apache HTTP Server has control over port 80 and hence the issue.
So what is the issue, checkout the article: You receive a “The process cannot access the file because it is being used by another process” error message when you try to start a Web site in the Internet Information Services MMC snap-in.
Typically, this issue occurs when one or more of the following conditions are true:
- Another process is using port 80 or port 443 on the computer that is running IIS. By default, IIS uses port 80 as the default TCP port and port 443 for Secure Sockets Layer (SSL).
- The ListenOnlyList registry subkey is not configured correctly on the computer that’s running IIS.
- Run Apache on a different port i.e. other than port 80
- Get a new IP Address and configure IIS to run on a particular IP Address by configuring ListenOnlyList
On Windows Server 2008, you can use netsh to add the ListenOnlyList.
Verifying the same in the registry.