How to resolve Apache web server port 80 access problem
After updating to Windows 10, my Apache web server couldn't be started anymore. The error message was showing multiple problems and I had to debug one by one.
The first message was "Could not reliably determine the server's fully qualified domain name, using 10.1.1.4 for ServerName".
The second message was "An attempt was made to access a socket in a way forbidden by its access permissions. : make_sock: could not bind to address 0.0.0.0:80".
This message says that port 80 is used by another service so can't be used by Apache web server.
After some search, this article shed some lights.
I followed the steps and eliminated the possible causes one by one.
First, I don't have IIS, SQL Server Reporting Services installed.
Then, for Skype, I disabled possible Port 80 use. Open Skype, go to Tools > Options > Advanced > Connection, uncheck "Use port 80 and 443 as alternatives for incoming connections".
After all this, Apache still refused to start. I needed to find who was using port 80.
Now I needed to use Command Prompt to run some system command.
One of the quickest ways to launch the Command Prompt is to use the Run window (Press Win Key + R on your keyboard to bring up the run menu, then type cmd to open the Command Prompt).
Entered the command line: netstat -ao
The netstat utility displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics and IPv6 statistics.
The process that used port 80 was PID 4.
I then opened up Windows Task Manager. The PID 4 process was NT Kernel & System. I didn't kill it immediately as I knew it might cause problems and the NT Kernel & System could be anything system related - I had to do some more digging.
After some try and error, it turned out to be the World Wide Web Publishing Service was using the Port 80. After disabling it, Apache web server was started with no errors.
World Wide Web Publishing Service provides Web connectivity and administration through the Internet Information Services Manager. If you don't use IIS on your computer, disable the publishing service so that port 80 can be used by Apache.
What could have happened
When upgrading to Windows 10, my Apache server was not running, so the upgrade automatically flagged that it's fine to let IIS World Wide Web Publishing Service use port 80 even though it can use other ports instead. To prove my theory, after Apache is started up and running, I manually started World Wide Web Publishing Service again, and it started without problems, which means that World Wide Web Publishing Service has switched to some other port.
Copyright © 2017 GeeksEngine.com. All Rights Reserved.
This website is hosted by HostGator.
No portion may be reproduced without my written permission. Software and hardware names mentioned on this site are registered trademarks of their respective companies. Should any right be infringed, it is totally unintentional. Drop me an email and I will promptly and gladly rectify it.