Update: This application will help you track down which applications are using which ports on Windows – very helpful for debugging if the steps below don’t solve your problem, or if IIS is not the only application answering on port 80: http://winnetstat.zapto.org/
Also, if you don’t specifically need all the features of XAMPP, but would like to run PHP/MySQL applications through IIS, give Web Platform Installer a try. Through WPI, you can choose to install PHP directly within IIS (so that IIS can serve both ASP.NET and PHP applications on port 80, for example) and you can also have a ton of applications installed and configured automatically for you, such as Drupal, WordPress, and Moodle (among many others). However, if you are still looking to run XAMPP specifically, or just run an Apache instance along with IIS, check out the instructions below. Thanks for visiting!
Found out the hard way that the default XAMPP install for Windows will attempt to install Apache as a service configured to run on Port 80 (no surprise, and probably good default behavior). But, if you’re like me, and have IIS already installed and running, for whatever reason, you’ll probably want to configure XAMPP to run Apache on a different port.
I initially tried merely modifying the httpd.conf file located (on my system) at C:\xampp\apache\conf, but the service would still not run. So, through a bit of searching on the interwebs, I found out what exactly needs to be changed to allow XAMPP to co-exist with IIS configured to run on Port 80, and Apache (in my case) to run on Port 8080 (and SSL running on Port 4499):
- Search for “Listen 80”, change to “Listen 8080”
- Search for “ServerName localhost:80”, change to “ServerName localhost:8080”
- Search for “Listen 443”, change to “Listen 4499”
- Search for “<VirtualHost _default_:443>”, change to “<VirtualHost _default_:4499>”
- Search for “ServerName localhost:443”, change to “ServerName localhost:4499”
Then, you should be able to start Apache successfully through the XAMPP control panel.
Let me know if this works for you; I’m just starting to mess with XAMPP on Windows (I’ve been using it on Linux for a while).