Apache on Windows 7 (WampServer Solution)

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!
You could also change the port to 8080 in http.conf in apache directory.
Change Listen 80 —> to Listen 8080 line
Then test http://localhost:8080/ in your browser
But remember
There is Also on more thing you might want to do.
A recent update disabled the Line
127.0.0.1 localhost
in c:\windows\system32\drivers\etc\hosts file
Uncomment this by removing the “:”
Also remember
- NOD32 conflicts on localhost. Disable HTTP Protection. Advance Setup. (you can disable WebProtection or exclude the 8080 port)
- Open “PHP.ini” and set E_ALL to E_ALL & ~E_NOTICE
May 15th, 2009 at 8:03 am
Come on! BETA tester…
Give us some real impressions over Windows 7!
Is it worth a try?
June 23rd, 2009 at 9:13 pm
Thanks for handing out the solution! Got the indian working
June 27th, 2009 at 12:42 am
Thanx and Have Fun …
W7 really rox even on RC edition!!!
November 13th, 2009 at 9:56 pm
Obrigado valeu demais….Very good….
November 15th, 2009 at 10:44 pm
Another solution that does not need modification of the regestry.
control panel->system and
security->System->Advance System settings->performance->Data Execution Prevention->Turn on DEP->Add
now go and find httpd.exe or whatever is your apache exe name is. restart, this also works for WAMP.
January 27th, 2010 at 4:57 pm
Windows 7 is worth installing, IMO (so far). Thanks for posting this solution. I tried to get it to run last night after installing and realized that Win7 might be consuming port 80 already, yet I didn’t install IIS yet, so I found that odd. anyway, thanks for posting this. I’m going to give this a try tonight.
Cheers!
March 9th, 2010 at 5:39 pm
what an awesome thing to post! Sir, you rock, you answered every single question regarding this subject!
April 16th, 2010 at 9:21 am
hi this is fawad i have a problem using windows7
my apache server doesn’t run on this version of windows please tell me how to install & use apache server on windows7
May 2nd, 2010 at 10:16 pm
THANX mate i have lost all the day lookin what to do… you helped!