Due to a recent computer catastrophe, I had to re-install Windows 7 from scratch. Afterwards though, I couldn’t get Apache to start. I was previously working on a system which had been upgraded from Windows Vista to Windows 7 so something was different about the clean installation.
When I’m doing web-development on Windows, I typically use WAMPServer as it usually installs and runs Apache, MySQL, and PHP very easily. In this case, it reported that I couldn’t start the Apache service. However, I found that I could still visit “http://localhost” in my browser and get a blank page. I didn’t see an error message so something else must have been listening on port 80 (the standard port for web-browsing). It took some digging, and a little trial and error, but it turned out to be the “World Wide Web Publishing Service” in Windows. I’ve never seen or used this service before. As far as I can tell from reading about it online, it’s something to do with Microsoft’s webserver, but I’m not intending to use it.
How to fix it
The solution was to disable the WWWPS service. After that, Apache was able to start as normal.
If you’re not familiar with managing services, click your Windows button, and in the “Search programs and files” box enter “services”, then press enter. The Component Services program should appear. You may need to click “Services (local)” on the left. Scroll down the big list of services and find “World Wide Web Publishing Service”. Right click it and select “disable”.
Try to run Apache again, and hopefully it will work.