I run Windows 7 on my computer.
For local development of mainly WordPress sites, I use XAMPP for Windows from Apache Friends. A trusted solution that runs without problems. XAMPP is the most popular PHP development environment. XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl.
But after installing Microsoft Visual Studio 2019 to study C#, I ran into a strange problem with XAMPP’s Apache.
The problem was that Apache couldn’t start.
The message shown on XAMPP Control Panel was:
“Apache WILL NOT start without the configured ports free! You need to uninstall/disable/reconfigure the blocking application or reconfigure Apache and the Control Panel to listen on a different port.”
After an investigation that lasted a couple of hours I found the solution.
Visual Studio 2019 installs a service named Web Deployment Agent Service that uses port 80. The same port that Apache uses.
The solution is to stop the Web Deployment Agent Service before running XAMPP.
To do so, from Control Panel, open the Services program.
Find the Web Deployment Agent Service and stop it before starting XAMPP.
That’s it, problem solved!