For Apache to be able to start/run, it has to be able to bind to (and listen on) port 80 (the HTTP port).
If after installing Apache (or a WAMP such as WampDeveloper Pro), rebooting, and trying to start Apache again – Apache is not able to bind to port 80 and start, then another Application or Service has already taken this port.
For Apache to start, we have to figure out what’s using port 80 (and possibly port 443) on your system, and stop and disable it.
Known Windows Services That Listen on Port 80
From Services Manager (run: services.msc), stop and disable these Windows Services which are known to bind to port 80.
Double click Service, and change ‘Startup Type’ to ‘Disabled’…
- SQL Server Reporting Services (ReportServer)
- Web Deployment Agent Service (MsDepSvc)
- BranchCache (PeerDistSvc)
- Sync Share Service (SyncShareSvc)
- World Wide Web Publishing Service (W3SVC)
- Internet Information Server (WAS, IISADMIN)
You might, or might not, have some of these Services installed and running.
These services are not needed for normal Windows functionality, and can be safely disabled.
HTTP (HTTP.SYS) Hidden Driver/Service
Windows Server 2003/2008/2012 and Windows XP(SP2)/Vista/7/8/10 comes with an HTTP front-end proxy service who’s job is to parse and forward incoming HTTP requests to other Services.
Values in URL “http://hostname:port/virtual_url_or_dir” are registered with it, and when an HTTP request comes in that matches on those values, that request gets routed to the other application or service (which itself is running on a different port).
HTTP.SYS is usually started “on demand” by other services (Windows Remote Management, Print Spooler, etc), and is not usually listening on port 80 until some other application registers a HOST (127.0.0.1) + PORT (80) + virtual URL/DIR with it. HTTP.SYS runs under PID 4 (NT Kernel).
On some Windows systems, oftentimes port 80 is already taken by HTTP.SYS for use.
Show Reserved URLs:
netsh http show urlacl
Show active Registered URLs:
netsh http show servicestate
To Disable HTTP.SYS:
Control Panel > Device Manager In menu View, select: Show hidden devices Open tree: Non-plug and Play Drivers Double-click: HTTP Tab Driver - Group Startup Switch from: Demand to Disabled
Or run this from the administrative privledged command-line (right click cmd.exe, select – run as admin):
net stop http /y
sc config http start= disabled
Other Web-Server Applications
Make sure you’re not running:
A. Other instances of Apache
B. IIS and/or WebMatrix
C. Tomcat
IIS and Tomcat are web-server applications that also bind to port 80 by default.
IIS can be removed via Windows Features on Vista/7/8/10, or on Windows Server via Role and Components Removal.
Skype
Skype usually takes up ports 80 and 443.
You’d need to stop Skype and change its settings to not use these ports:
Tools > Options > Advanced > Connection Uncheck "Use Port 80 and 443 for incoming connections"
Or set Apache’s Startup type as “Automatic”, this way Apache might start before Skype does, and will be able to bind to port 80 and 443 before any other application has a chance to take these ports.
* Skype for Windows 8 (Modern UI) is not able to change port numbers. Only “Skype for Desktop” can do this.
TeamViewer
Check both Tasks Manager (Processes Tab – click ‘Show processes from all users’) and Services Manager to see if you have “TeamViewer” running… This process or service waits several minutes after computer start-up, and then takes port 80 if it’s available. If present, you should stop and disable it too, or configure it not to use port 80…
Disable TeamViewer from using port 80:
Extras > Options > Advanced Enable option "Don't use incoming port 80"
Windows Work Folders
Under Windows Server 2012 R2 and Windows 8, Microsoft has introduced a new feature called “Work Folders”, that synchronizes files/folders between different machines.
By default, “Work Folders” uses ports 80 and 443!
There are 3 options to get around this, from simplest to more difficult…
A) Disable the Windows ‘Sync Share Service’, named “SyncShareSvc”.
B) Remove/ “Work Folders” Server Role / Windows Feature:
Launch Server Manager. Click "Add roles and features". Server Roles -> File and Storage Services -> File and iSCSI Services -> Work Folders
C) Or change the ports “Work Folders” use:
Edit file:
C:\Windows\System32\SyncShareSvc.config
Change ports from 80 to 11180 and 443 to 11443 (or something else)…
<sites>
...
<bindings>
<binding protocol="http" bindingInformation="*:80:" />
<binding protocol="https" bindingInformation="*:443:" sslFlags="0" />
...
Then from a permissions-elevated command-line (right click cmd.exe, Run as admin), run:
Netsh http add urlacl url=http://*:11180/ user="NT Authority\LOCAL SERVICE"
Netsh http add urlacl url=https://*:11443/ user="NT Authority\LOCAL SERVICE"
You’ll also need to follow more instructions here:
http://blogs.technet.com/b/filecab/archive/2013/10/15/windows-server-2012-r2-resolving-port-conflict-with-iis-websites-and-work-folders.aspx
http://kylejwx.wordpress.com/2014/03/06/work-folders-on-windows-server-2012-r2-essentials/
VMware Host Agent service
The VMware Host Agent service uses TCP ports 80 and 443 by default.
Edit > Preferences > Shared VMs Change the ports
VMware, Configure Virtual Machine Sharing and Remote Access
Use NETSTAT to Detect Port 80 Listeners
Open the command line (System tab, button: Command Line) and run:
netstat -o -n -a | findstr 0.0.0.0:80
netstat -o -n -a | findstr 127.0.0.1:80
Inspect the lines with a “Local Address” showing port 80 and/or 443 in use. Note the PID number. Then open Task Manager (run: taskmgr.exe), and in Processes tab, see if you can find the application with that same PID number. This app needs to be shut down. If you don’t see it, click “Show processes from all users” button.
http://support.microsoft.com/kb/281336
On newer Windows versions you can get the application name directly by using netstat’s ‘-b’ option:
-b Displays the executable involved in creating each connection or listening port. In some cases well-known executables host multiple independent components, and in these cases the sequence of components involved in creating the connection or listening port is displayed. In this case the executable name is in [] at the bottom, on top is the component it called, and so forth until TCP/IP was reached. Note that this option can be time-consuming and will fail unless you have sufficient permissions.
Thank you!! Your list of Windows services is the most comprehensive I’ve found! It was the SQL Report Service that did it for me. Wasted 24 hours tracking this down. Thank you!!
Hello, Thanks for best and very comprehensive article on port 80, it was really very hard for me to find out how to fix this problem, and it was the sql server reporting service which made the problem for me.
thanks
THANK YOU!!!!!
Ditto!
For me, it was SQL Server Reporting Services.
Bless you.
Thank u buddy… Your explanation is best I found.. (y)
Awesome!!! I had disabled IIS services from windows 8 but port 80 was still in use by some pid 4 system process. Turns out that the Web Deployment Agent Service (MsDepSvc) was running and set to turn on automatically. I disabled startup and stopped service – apache is backup and running
thanks
Thank-you
The deactivation of services MsDepSvc has corrected the error .
Now running again XAMPP
Port 80 can be used again
When all else fails to uncover the application that is using port 80, try communicating with it to see what information it outputs…
1. Install PuTTY, which can communicate via telnet protocol.
2. Open Session with the following settings:
Click – Open.
3. Type in:
GET / HTTP/1.1
HOST: localhost
Press enter key again.
If the culprit is a web application / server, it might give up it’s details, or provide clues to you.
Another way to find out which process is listening on port 80, is to download and run TCPView:
http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx
Dropbox is another port 80 snatcher
I install cacti on windows server 2012.
Cacti was abundle programs comes builtin with Apach (Apache+php+Mysql).
After installation, I just enable:
1. Ping
2. create a inbound firewall rule to allow port 80 and since i just wanted it to be accessed under domain so I check domain options only.
It works without headache.
Thanks
Rico
Another good article that talks about finding the application that is taking up port 80:
http://www.howtogeek.com/howto/28609/how-can-i-tell-what-is-listening-on-a-tcpip-port-in-windows/
Thank you so much. I installed a program that installed SQL server 2008 alongside it and killed my xampp install. Wasted an hour on this. Thanks again.
While installing MAMP the Apache port 80 notice showed up. After Disabling a few of the first list, Apache was corrected.
Thank you very much.
Very nice comprehensive rundown. Many of the other pages I’ve spent the past several hours looking at treat it as though there’s one cause or are very confused. This was the (happy) end of my search for a solution.
http.sys turned out to be the issue for me. However, worth noting that the Control Panel interactions described are not valid for win 8.1, which apparently will not permit you to see the ‘non-plug and play drivers’ tree. I wasn’t able to see http.sys through any of the GUI consoles, even after running as administrator. Needed to use the command line.
Powerful comprehensive rundown. Thanx
very helpful indeed.
Thanks i have finally managed to release my port.
Thank you! It was the World Wide Web Publishing Service (W3SVC) taking port 80 on mine.
Thanks about your useful article.
I follow it and remove some process but a process still listening on 80 port that its address is [::]:80 that is on PID 4.
Please tell me to remove it.
Thanks
Thank you very very much
Finally i was able to run Apache on port 80 successfully, i spent a lot of time and almost gave up unable to fine working solution, after disabling “Web Deployment Agent Service” it worked perfectly
Thank you very much
Was trying to install Desktop ServerPress and got the error that Port 80 was blocked. Skype was the culprit. Thanks, thanks, thanks!!!
in my case Avira blocking the port 80 ,now running.
Thanks. I have solved this issue after stop sql server reporting service.
Thank you so much for all of your different solutions. After trying to resolve my ‘Port 80′ problem for the better part of 2 days, I finally found out what the culprit was using
netsh http show urlacl
Reserved URL : http://+:80/FilpWifiPowerManager.svc/
User: \Everyone
Listen: Yes
Delegate: No
SDDL: D:(A;;GX;;;WD)
I have an Asus 2 in 1 laptop and their Flip Lock service attaches itself to Port 80. Simply disabled the service and everything works now.
Whoever wrote port 80 for this at ASUS needs to be restrained and flogged for 30 minutes.
Thank you for your advice, saved my rest of the day!!
tnx for solutions
it is really helpful document. pls accept my thanks.
good heavens. It works now.!!!!! Thank you…….
Thank you very Much. This solved me as Well! Thank you Very Much!
Thanks a lot.
This saved me a lot of work.
Just like to thank you for this post. Was trying to get WP DesktopServer to install and kept on getting an error saying that it was likely WAMP or IIS running on port 80 but blocked the installation from completing. They have the Skype issue indicated on their site but it was by disabling http.sys that I was able to install it OK. Thanks again for taking the time to write this up lost nearly hour before finding this post…
John
Just wanted to add, as the above comment may be slightly misleading, when installing DesktopServer for WP on another machine, you do still have to follow the principle of going into the advanced options of Skype and prevent it from using port 80 (also 443 is included in the same option you can’t choose either or) and then the http.sys above command as well (if the Skype option alone doesn’t work).
Nice
Windows 10 runs a “World Wide Web Publishing Service” on port 80. Start service.msc. Scroll down to find “World Wide Web Publishing Service” and stop it. You might also want to change it’s Startup property to “manual.”
Thanks!!! It was Web Deployment Agent Service (MsDepSvc) for me. I think that came from a previous install of trying to use Microsoft’s Web Platform Installer (just a hunch?).
Great, Thanks
Thank you for your advice, saved my rest of the day!!
Thank you very much for gathering all this useful info in one place! Very good resource.
For me it was the BranchCache (PeerDistSvc) that was causing the problem. Took me 4 hours to find it…
Many thanks, it was the web deployment services blocking 80
Thank you so much for you help!
My Apache was not working and I’ve just stopped the BranchCache service and now everything is alright!
Cheers
Hats off for such a detailed explanation. I thank you very much master!
I tried everything on the web Nothing works but your article solved it for me! Thanks so much!
Hi,
Thank you so much. It was “World Wide Web Publishing Service” which was blocking this.
I have wasted more than 72 hours to find this solution. Thanks.
thanks a million
The following error was encountered while trying to retrieve the URL: http://localhost:83/
Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
Your cache administrator is root.
Hi, I have no services running on port 80 ( checked by using netstat -o -n -a | findstr 0.0.0.0:80 and netstat -o -n -a | findstr 127.0.0.1:80). It didn’t show anything. But still I can’t able to connect to port 80. Please help me with this.
Hi, I am asking for help to connect to port 80,I tried several times without success
thanks, very Usefull
Awesome. My culprit was SQL Server Reporting Services (ReportServer). I have been trying for sometime now. Thanks loads
thanks it’s very helpful !
Thanks its very helpful