Getting Apache to run on port 80 on Windows 7
Update
This solution is no longer necessary. It turns out a service called BranchCache is the culprit. Disabling this service stops Windows from listening on port 80 thus allowing you to run a web server. The description for BranchCache under services.exe is ‘This service caches network content from peers on the local subnet.’
Thanks to a fellow beta tester for the latest resolution.
I’m currently beta testing the next version of Windows, Windows 7 and came across a strange issue while trying to get Apache to install and run using the default port, 80.
Running the command ‘netstat -ano’ from the command line revealed
that port 80 is being used by PID 4.
Looking up PID 4 using Power Shell and then Task Manager revealed
that PID 4 is the NT Kernel!
So Windows 7 by default appears to be using port 80.
After a bit of hunting around the Internet and doing some research of my own I found that the service http.sys was the culprit and all I needed to do was disable it but I could not find this service listed in the Services control panel applet.
So what’s the solution?
You have to disable the http.sys service manually via the registry:
1) Launch RegEdit:
2) Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
3) Add a new DWORD (32-bit) value
4) Name it ‘NoRun’ not including the quotes
5) Double click the new property
6) In the Value data field type ‘1′ not including quotes and click OK
7) Re-boot your computer
You should now find that Apache will start on port 80!
After fixing the port 80 problem by disabling UAC I now get this error:
The system cannot find the specified file. : No installed service named “Apache2″.
I get this after installing a fresh version (2.0.52) I used on the XP Pro system then copying over the Apach Group folder or if I just start with a freh install of v2.2.14 Would I be better off to just install Window XP Pro over this Windowes 7 Pro system
Guess I spoke (wrote)too soon. Apache 2.0.05 was giving me too much trouble so I upgraded to 2.2.14. This eliminated the No Service Installed error, and the system does come up in localhost mode, but when it loads I get:
(OS 10048) Only one use of each socket address (protocol/network address/port)is normally permitted. : make_sock: could not bind to address 0.0.0.80. No listening socket available.
Shutting down. Unable to open logs.
I ran netstat -ano | find “:80″ and it indicated LISTENING PID 80
I’m not sure how to trace that or what might be causing it.
i have done the above an disable the service BranchCache still no joy windows is still listining on 80
Hello. This is my instruction (we simply change the way to run):
1) Launch RegEdit:
2) Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
3) Find a DWORD (32-bit) value ‘Start’ not including the quotes
4) Go to the properties
5) In the Value data field type ‘0′ not including quotes and click OK
6) Re-boot your computer
You should now find that Apache will start on port 80!