How To Run IIS And XAMPP Together On Same Machine

          It is possible to run both IIS and XAMPP servers together on same machine by just changing the port number of any one of the server’s. XAMPP-Apache and IIS both the server’s uses the same port 80 to connect. In this post i am going to show you how to change the port number for the XAMPP-Apache server. Changing the port number for Apache server allows you to run both IIS and XAMPP server’s on same machine using different port’s.

  • Firstly, You need to know the directory where XAMPP is installed (root directory of xampp). The default directory is c:\xampp\. From the root directory navigate to ” apache\conf ” directory and find the file “httpd.conf”.
  • Before editing the file, make a backup of it with a name “httpd.conf.bak” so that if something goes wrong you can replace this file.
  • Now open the file “httpd.conf” with an editor like notepad. You need to make two edits to the file.
The first one:
  Find out the below lines in the file.
  #Listen 0.0.0.0:80
  #Listen [::]:80
  Listen 80
  change port number as shown below (8080 in my case):

  #Listen 0.0.0.0:80
  #Listen [::]:80
  Listen 8080
The second edit:
  Find the below line:
  ServerName localhost:80
  Set a different port (again 8080 in my case):

  ServerName localhost:8080
          You have finished changing the port number. Now restart your apache server from the xampp control panel and its ready to run.
          Open your browser and and enter the address “localhost:8080“. You can see the root directory of apache opened. There is no need to make any changes to the IIS server and you an access it by just entering the address “localhost” in your browser.
          In the above screenshot you can see the IIS server being accessed through “localhost” and XAMPP server through “localhost:8080” on the same machine and even the same browser at a time.

9 Responses to How To Run IIS And XAMPP Together On Same Machine

  1. Shailesh says:

    thank you so much 🙂 🙂

  2. volkan says:

    Thank you so much! you saved me! 🙂

  3. BV says:

    Thank you so much. This really helped me. 😉

  4. steve says:

    it works..Great.. Pretty good.. it saves lot of my time

  5. vivek sharma says:

    Thanks you so much

  6. Tin Nilar Win says:

    Grate job. Saves my time. Thanks

  7. Sandip Shelake says:

    Thanks great

  8. lead says:

    uuuuu jusst made my day thqqq u a lotttt

  9. Nabeel says:

    Thanks Dear

Leave a Reply

Your email address will not be published. Required fields are marked *