A fix for XAMPP – Apache Server in Windows 10

Windows 10 will throw errors when you try to start Apache server in XAMPP.
7:56:35 AM [Apache] Attempting to start Apache app…
7:57:05 AM [Apache] Problem detected!
7:57:05 AM [Apache] Port 80 in use by “Unable to open process” with PID 4!
7:57:05 AM [Apache] Apache WILL NOT start without the configured ports free!
7:57:05 AM [Apache] You need to uninstall/disable/reconfigure the blocking application
7:57:05 AM [Apache] or reconfigure Apache and the Control Panel to listen on a different port

To fix this issue, the World Wide Web Publishing Service (IIS) of Windows 10 must be disabled. This service by default it’s using Port 80.
Open a CMD prompt and type in command: net stop was /y
Run Dialog Box (press keys Win+R) .. then type: services.msc
Then scrolled down to: World Wide Web Publishing Service Double clicked on it and clicked STOP (if this service status is Started)
Start Apache again with XAMPP.

Another way to get access to the services – go to Control Panel > System and Security > Administrative tools > Services
“SQL Server Reporting Service(MSSQLSERVER)” also uses port 80 and so it should be stopped if MS-SQL sever is insalled on your machine.

Another very easy option is to simply set Apache to listen on a different port. This can be done by clicking on the “Config” button on the same line as the “Apache” module, select the “httpd.conf” file in the dropdown, then change the “Listen 80” line to “Listen 8080”. Save the file and close it.

Now it avoids Port 80 and uses Port 8080 instead without issue. The only additional thing you need to do is make sure to put localhost:8080 in the browser so the browser knows to look on Port 8080. Otherwise it defaults to Port 80 and won’t find your localhost website.