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!
8 February 2010 at 2:38 PM
@cosmin
Yeah Cosmin, I was just kidding.
I’m enthusiast with my brand new windows 7, as much as I am in love with XP, but such problems made me drive bananas. After all, after having fixed that problem the first time, and then the services restarted, I had no more problems. Maybe due to some automatically installed patch, or something changed within the windows configuration.
10 February 2010 at 3:32 AM
Just stop the service SQL Server Reporting Services (MSSQLSERVER), that’s all.
18 February 2010 at 1:58 PM
I just followed the steps from (b), now my wamp server is working fine… thank you very much… after a week I got the solution
25 February 2010 at 2:14 PM
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
26 February 2010 at 4:05 PM
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.
4 March 2010 at 2:47 PM
i have done the above an disable the service BranchCache still no joy windows is still listining on 80
8 March 2010 at 9:29 PM
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!
12 March 2010 at 10:52 PM
@NeoXidant
This does work, but it kills off windows printing services which relies on that HTTP component.
29 March 2010 at 10:47 PM
Hi !
For those of you who have problem using EasyPHP or any other web server and using Skype. Make sure to change the port skype whas using. By default, skype use port 80 ans this will block any apache server to be lauch.
If you have able to install Skype, you should be able to changed the setting.
Hope this post will help any body.
Pingback: Vertrigo nao inicia no windows 7 » Ti4Ti – O Seu blog de Tecnologia !!
15 April 2010 at 9:58 PM
I think learning is always better than picking a short way out. I have the problem and am seeking to resolve it.
29 April 2010 at 2:06 PM
I have an alternate suggestion for Windows 7
In general, messing with the ports that your Operating System is using just seems like a bad idea, you’ll end up with weird network issues like printing
In addition, I need to have IIS running locally as well for the .NET projects I take on so having two web servers listening on different ports was important.
For me the best situation was simply to change the IP Port that Apache listens on (the default is port 80, which is the standard for all web traffic).
I changed mine to port 8666 (but it could be anything above 1024), I did the following:
Locate the httpd.conf file in the following directory [install directory]\xampp\apache\conf (mine was in, C:\xampp\apache\conf)
Find the line that says, Listen 80 and I changed it to Listen 8666. Save and Close the file and now Start the Apache service in the Xampp control panel. Life should be good.
Now the only catch to this method is that you can’t just go to http://localhost/xampp anymore you have to tell your browser which port specifically to use (it will by default use 80), so you will have to use http://localhost:8666/xampp/ (the port is designated by the colon and then the number).
The cool thing is I can run http://localhost:8666 to run Apache and http://localhost:8616 to run my local IIS for .NET projects.
I hope this helps someone
Jeremy
1 May 2010 at 6:31 PM
I had this problem with SQL Server 2008 Enterprise Reporting Services. Disabling it works!
5 May 2010 at 2:02 PM
@David
Thanks for that reply. Disabling the SQL Server 2010 Reporting Service saved me after 3 hours of doing nothing but browsing the web for a solution
11 May 2010 at 10:45 PM
thanks David, my problem was Reporting Services too.
12 May 2010 at 12:04 PM
Hey mate, I followed your instructions but I think I did something wrong here. I am using Xampp version 1.7.3, and do have to turn on SVC by installing them or do I turn them on by the start button for ‘Apache’ and ‘MySql’?
I appreciate your help
CHEERS
12 May 2010 at 12:30 PM
lol..I got it going friend
Thanks for the valuable info.
19 May 2010 at 2:19 PM
@David
I have the same issue with SQL server 2008, and you where right about sql server was using port 80, it`s been changed tu use port 8080.
Apache now starts without complainings on por 80.
10 June 2010 at 4:49 PM
Comment #26 by Fred (which I have quoted below) is absolutely awesome. It sums up all reasons that are discussed in this thread, plus more !
Brilliant job Fred ! Thank you very much.
- Oh! and … for me, it was ‘World Wide Web Publishing Service’ that caused the problem.
13 June 2010 at 6:29 AM
Works perfectly. Thanks.
20 June 2010 at 7:23 AM
Fred’s answer was full of good tips. Using his procedure, I found that in my case it was TeamViewer that was hogging port 80. Bad since that’s the remote admin tool I was using at the time. (I use RDP from my Mac for the other Windows machines… but they run XP and this machine runs Windows Home “Premium” which doesn’t support RDP.
Well, actually it does… you can use this “home” version of Windows to control other computers via RDP, but no one can support you by controlling yours using RDP. Typical backwards M$ thinking I guess. (And just one of a number of crippled features in “Home Premium” Microsoft neglects to mention on their edition comparison charts.)
26 June 2010 at 9:38 PM
Thanks, Moosa. Works a treat
9 July 2010 at 3:56 AM
http://support.microsoft.com/kb/149605
The above link shows you how to change the IIS port bindings. I changed them to port 8585 which allowed Apache to start flawlessly. Now how to change windows remote management https port to other than 443… that’s what I would like to know.
9 August 2010 at 3:19 PM
Hi
I ve searched the web all around and this page is far the best with suggestions.
Though, I dont get a totally good solution…
I am with Windows 7 integral 64 bits and Easyphp 5.3.1.0
1> I ve tried changed the port for Apache to 8080, through Apache config file
Then the servers start, I can access them but…
I am blocked when I try to configurate the database acces of my CSS: normally I should put “localhost”, now when I put either localhost:8080 or 127.0.0.1:8080, it does not work…
2> I’ve tried Fred’s method #1 above, that is disable the http within the device manager.
Then, Apache starts on port 80 and I feel happy
But then, none of my printer (pdf printer, etc) works, I guess it is sthg Windows needs to work
3> I’ve tried Fred’s method #2 above, that is modify the registry
Unfortunately, apache still does not work…
4> I ve went trhough Microsoft link above, but I can’t find sthg that applies to Windows 7
If anyone has an idea, especially with Fred’s method that seems best.?..
Thanks
9 August 2010 at 3:20 PM
NB: is there no way to get Windowsz http.sys run on another port?
9 August 2010 at 3:38 PM
For now, the best way I ve found is to turn http service on and off…
- When I need Easyphp, I run cmd and
net stop http
- WHen I need the spooler, I run cmd and
net start http
10 August 2010 at 10:25 AM
Oups… I had not seen the update on top of page
For me works perfect, with Windows 7 64 bits ultimate and Easyphp 3.5.1:
1> disabling brandcache service,
=> allows Apache to run on port 80
2> in C:\Windows\System32\drivers\etc\hosts file
Remove # to reenable instruction to use 127.0.0.1 as localhost
=> enable me to use localhost and declare it in my CMS as database location
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
# ::1 localhost
22 August 2010 at 6:30 AM
Check this before disabling http.sys: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a2a45c42-38bc-464c-a097-d7a202092a54.mspx?mfr=true
10 September 2010 at 7:08 AM
@Parthipan
Thanks, I just used option(b) now my xammp is running in port 80.
Thanks a lot!!
10 September 2010 at 7:12 AM
13 September 2010 at 7:25 PM
@David
Same here. Thanks for the pointer.
23 September 2010 at 8:03 PM
Thanks Jeremy, that worked a treat. I’ve been trying to set up EasyPHP on my Win7 machine and had tried everything else – disabled skype, disabled the BrandCache and still there was something listening on 80. So your method of getting apache to listen on a different port worked fine. Thank!
7 October 2010 at 1:11 AM
My problem was with SQL Server 2008 Reporting Services. I found that you can change the port that Apache listens on (that works! I used 8666). However, if I turned off Reporting Services and changed it to run manually I could execute Apache on port 80 (no reboot required).
15 October 2010 at 11:20 AM
Bonjour,
A lire tous les commentaires concernant ce problème de port avec Apache et le conflit avec Windows 7, je ne sais pas ce que je dois faire. Chacun y va de sa recette mais aucune n’est la vraie solution. Il y a conflit entre Apache, Windows 7 et IIS7. Si je fais netstat -nao | find “:80″, je trouve adresse PID 4 avec listening. En cherchant plus loin, je trouve que ce port 4 correspond à NT Kernel & System… mais ça ne résous pas le problème. Que j’installe la dernière version de wampserver ou de EasyPHP, je me retrouve avec le même problème. Dois-je rentrer dans la base de registre, dois-je me priver des fonctions d’impression?
Que faire?
Merci d’apporter une réponse si cela est possible. je pense que Microsoft a voulu par là empêcher toute concurrence de venir faire le ménage. je n’apprécie pas du tout cette politique du pire.
Cordialement.
Mathsprof
26 October 2010 at 9:13 PM
Agradecimiento total
10 November 2010 at 3:03 AM
@David
Yep, I had SQL Server 2008 R2 on my PC, I turned that off and problem is solved, GREAT!
10 November 2010 at 1:11 PM
With eset smart security disable http checking and you will be able to run apache on port 80
22 November 2010 at 3:44 AM
Had a similar problem.
The Remote Desktop Service was running on :80. I didn’t notice it because it’s masked as a svchost.exe process.
Once I disabled the service, things ran fine.
23 November 2010 at 2:11 PM
@skeptigator
Jeremy you are a life-saver. THANK YOU
9 December 2010 at 3:31 AM
Excellent post! Thank you for your update. I turned off BranchCache and Apache started working right away. This post saved me a ton of time! I had the problem fixed in 5 minutes.
14 December 2010 at 7:55 PM
For my windows 7 home edition. The program blocking Port 80 is Skype.exe but not branchCache. I Ctrl+alt+Delete, using task manager, found skype.exe and then end process tree.
BAM Apache runs!!! oh yeah
26 December 2010 at 1:27 PM
Thanks david
SQL Server 2008 Enterprise Reporting Services.
Disabling it works!
7 February 2011 at 7:24 PM
Thanks Steve!
It’s indeed Skype that was messing with the startup of Apache! (I was trying to do a quick install with xampp).
14 February 2011 at 6:29 AM
@skeptigator
It worked. Thank You so much
2 April 2011 at 5:01 PM
@David
Thanks mate, that worked brilliantly on Vista as well.
21 April 2011 at 10:49 AM
Skype was the problem also on my end. Thanks man!
Pingback: Microsoft Web Platformer Installation Problems with Windows 7 « Dani J. Moss
19 June 2011 at 6:54 AM
@Moosa
Thank U sooo much. i solved my problem.:-)
22 June 2011 at 10:00 PM
Fresh install of Windows 7 Standard Edition, it was not the BranchCache service that was using up port 80 on mine, but rather “World Wide Web (W3SVC) under “Local System” services, described as “Provides Web connectivity and administration through the Internet Information Services Manager”. Once this was disabled, port 80 freed up, and this survived a reboot changing the service to Manual.
2 July 2011 at 2:46 PM
I think the BrandCache global disclaimer is misplaced, clearly does not apply to all folks.