It is possible to run both IIS and XAMPP servers together on the same machine by just changing the port number of any one of the server. XAMPP-Apache and IIS both the server’s uses the same Port 80 to connect.
In this post, we will learn how to change the port number for the XAMPP-Apache server. Changing the port number for Apache server allows us to run both IIS and XAMPP server’s on the same machine using the different port.
There are two ways to solve this –
- either change IIS (the harder way)
- change the Apache config (the easier way
Change the Port Defaults
By default, IIS uses ports 80 and 443 for HTTP and HTTPS access respectively (list of ports and what they do here). By default, Apache also assumes uses the same settings (as does XAMPP).
Change Port Setting of Apache Server
Step I: Open Port setting of XAMPP
- Edit file C:\xampp\apache\conf\
- Change line 63 to Listen *:81
- Change line 175 to ServerName localhost:81
- Edit file C:\xampp\apache\conf\extra\
- Edit line 42 to Listen 442
- This changes the SSL (HTTPS) port to 442 (or again, your port of choice).
- Restart Apache via XAMPP Dashboard.
- Enjoy IIS and XAMPP Together