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 native 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.
HTTP (HTTP.SYS) Hidden Driver/Service
Windows Server 2003/2008/2012 and Windows XP(SP2)/Vista/7/8 come 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:
Or run this from the administrative privledged command-line (right click cmd.exe, select – run as admin):
Other Web-Server Applications
B. IIS and/or WebMatrix
IIS and Tomcat are web-server applications that also bind to port 80 by default.
Skype usually takes up ports 80 and 443.
You’d need to stop Skype and change its settings to not use these ports:
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.
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…
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.
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:
C) Or change the ports “Work Folders” use:
Change ports from 80 to 11180 and 443 to 11443 (or something else)…
VMware Host Agent service
Use NETSTAT to Detect Port 80 Listeners