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!
3 July 2011 at 3:16 PM
@Moosa
thanx…
worked for me
30 August 2011 at 8:03 AM
Okay I’m conevincd. Let’s put it to action.
18 July 2011 at 2:22 PM
@David
SQL Server 2008 R2 Ent. too, turned the Reporting Service off and problem is solved.
+1
6 August 2011 at 9:17 PM
If you have SQL Server 2008 Report Service Installed that is the reason the port is being used as David said. Turning Reporting Services off will solve your problem.
7 August 2011 at 3:02 PM
why doesn’t my xampp work.. im using 1.7.5, i’m using windows 7
8 September 2011 at 2:53 PM
“ummm” isn’t that BETA software???
9 August 2011 at 6:21 AM
not work 4 me
18 August 2011 at 6:28 PM
work 4 me. need 2 reboot. tanks
22 August 2011 at 12:15 PM
The report really isn’t anything other then , I am lost on the internet trying to sea , see , C. c u- n’ it.Now , how far down the rabbit hole goes before , I’m like turn it off and go wash some dishes. Ya’ll motherfuckers ain’t scared. I’m here for my mom , my boss and everyone that hates me cause they want to hurt you , emotionally speaking.
8 September 2011 at 2:59 PM
Thanks Cameron,
That’s a good explanation (and fix) for Microsoft’s tendency to use http.sys (a driver actually) to empower remote management and reporting without the user being aware of the mechanism.
The http.sys (a driver actually) radically improves the response of IIS, as it moved the actual stream into the core of the OS, so the IIS process no longer has top manage that aspect. So from a server point of view, it was a good thing. Unfortunately, it allows MS services to be ‘hooked’ on with little user control
thanks again.
14 September 2011 at 10:49 AM
Disable service World Wide Web Publishing
26 September 2011 at 10:53 PM
worked for me, I am using win 7 64 so i had to create 64 registry value
thanks alot mate
28 September 2011 at 12:07 AM
Thankx…
worked for me
12 October 2011 at 1:03 PM
It starts Apache but doesn’t allow you to stop it. Also this “fix” does not address MySQL not working, just Apache.
18 October 2011 at 7:21 PM
I just had this problem and solved it by disabling the “World Wide Web Publishing Service”. Not sure why it was started maybe something with Office.
18 October 2011 at 11:33 PM
Hey, thx very much. so so much.
Turkey…
19 October 2011 at 2:14 PM
I have managed to disenable the BrancheCache servicen on windows 7 ultimate, but still apache is not running, it starts for a while and it stops..tell me what m doing wrong?
9 November 2011 at 6:59 PM
Thanks for this!! Was driving me crazy trying to figure this out!
20 November 2011 at 11:11 AM
The solution is one..
Go to regedit.exe go at:
HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>services>HTTP
and change,the reg_dword named “Start” ,it’s value to zero (“0″ without quotes) ,press okay.
Then restart.
THE IMPORTANT IS to open your server as fast your computer starts so port 80 is taken by apache…
It took my to find this 2days,as a summary of all the above…
I think I’ve helped
31 July 2012 at 10:12 AM
I’m confirming that this worked for me. The original post didn’t work, although Alexander El-Kady’s solution did. Thank you for posting this solution!!! really appreciate it
29 November 2011 at 6:04 AM
It not working in my system. Please give me any solution. I request to all.
3 December 2011 at 9:29 AM
i had the same problem starting my apache server on win 7, but it was not only port 80, but port 443 that was blocked. so i first said skype not to use port 80 and 443 as alternative ports for incoming connections. so port 80 was released, but 443 still blocked. so i tried the following (what should always work):
open cmd and type “netstat -aon” (without the quotation marks) and search for the PID that is listening to port 80 or 443. if the PID is not 4, you can easily go on, because PID 4 is the system prozess and cannot/should not be killed.
type “tasklist” in cmd and look for the PID of the task listening to port 80/443. if you don’t need it, go on by killing the prozess with the command “taskkill -pid [PID]”
i hope this one helps you running apache on win 7
8 December 2011 at 7:45 PM
grt.. !! i followed the steps and disabled http.sys.. Apache server is running after system reboot.. thanx…
18 December 2011 at 3:18 PM
Apache was not working on my laptop because Skype was using port 80. Try quitting Skype to see if it fixes the problem.
28 January 2012 at 4:36 PM
SQL Server 2008 Report Service was the problem, now solved, thanks a lot!
12 February 2012 at 4:37 AM
Great explicit directions leaving no blanks for the user to fill in and no misleading tangents
21 February 2012 at 4:06 PM
Thanks so much!!
Worked perfectly
4 March 2012 at 11:48 AM
I had the same problem, but none of the solutions presented here worked on my system. I had to open device-manager, enable “show non-pnp devices” (this is a translation from my German system. I do not know, if this is the name of the menu-option in English systems) and set the start-option of the HTTP-driver to deactivated. This set the value Start-Key in the registry-tree HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>services>HTTP to 4.
4 March 2012 at 12:32 PM
Problem is still there for me, I have changed the ports that skype and teamviewer use aswell as this.
7 March 2012 at 5:54 PM
It works!!! THX!!! I have been searching for something like this long time ago… Really, really thank you…
27 March 2012 at 7:28 AM
I don’t have any BranchCache in my machine, and this solution definitely was necessary and saved my sanity… I’d stopped skype and my antivirus and several other ‘suspicious’
services as well — thanks a lot!
1 April 2012 at 3:08 PM
The recommended change did not work for me. It turns out that Skype also likes to use ports 80 and 443. This fix did work:
Disabling Skype from Using, Opening, and Listening on Port 80 and 443.
12 April 2012 at 7:33 PM
try this “NET stop http”
23 April 2012 at 11:03 AM
Thanks))))
23 April 2012 at 6:41 PM
Go to services and disable MS’s World Wide Web Publishing Service
That’s the culprit. . .
-K
25 April 2012 at 2:06 PM
Stopping WorldWidePublishing service worked for me. All other attempts were failed(except adding a registry key value). Thanks guys. This was very helpful….
14 May 2012 at 10:18 AM
Thank you for saving my life! (or at least my day).
Do you have a Flattr account, so I can give you a tip?
22 May 2012 at 3:12 PM
It worked perfectly… Thank you…
29 May 2012 at 4:22 AM
Thank God!
This worked for me!
Thank you!!!
7 June 2012 at 11:35 AM
I could be a number of services, I went through a bunch, the last 3 since a netstat refresh were
Windows Live ID signin
Web Deployment agent
Office subscription agent
Probably best also to reduce start-up programs and start xampp shortly after startup.
28 June 2012 at 6:32 PM
Thank you Microsoft… for making our lives so much better!
12 July 2012 at 9:32 AM
I had the same problem on Windows 8.
Worked fine for a few days, then XAMPP and Skype both failed. Tried the fix above but no luck, then in the comments I saw something about IIS.
Removed this and now all works.
31 August 2012 at 7:25 PM
I was just about to throw in the towel after following the many dead end questions and answers in various forums and this has saved the day.
6 September 2012 at 9:11 PM
After going thru these steps and restarting computer, Apache is working. However, now Print Spooler won’t start because it depends on HTTP
… is there a way to just change port for HTTP?
Thank you
7 September 2012 at 3:55 AM
i no open port 80 SQL server 2000 win7
17 October 2012 at 8:37 PM
I have been surfing on-line greater than 3 hours today,
but I by no means discovered any attention-grabbing article like
yours. It’s lovely price enough for me. In my view, if all site owners and bloggers made good content as you did, the internet will be a lot more helpful than ever before.
24 October 2012 at 8:55 PM
@Tomas – Thanks, that worked for me.
1 November 2012 at 7:39 AM
I have been trying to get Xampp to work all day. I had it working and then an update came through so what did I do. I clicked on the update button and Xampp hasn’t worked since.
I am getting the Port 80 blocked message. I read your solution but I don’t know what “Launch RegEdit:” means.
Would someone kindly email me and explain
1 November 2012 at 11:39 AM
just stop w3sv in services to get apache running on xampp port 80
5 November 2012 at 6:18 PM
Disabling and Stopping the BrancheCache service on Windows 7 Ultimate, SP1 x64 system WORKED. I spent $159 with Pantek for 1 hour support and they didn’t resolve and I preferred NOT to pay for another hour!! Much Thanks for this solution!