We need to keep the following in mind while having multiple installations of XAMPP in windows 11:
- Apache (HTTP): The default is port 80. We need to change this to a new, unused port like 8080
- Apache (HTTPS/SSL): The default is port 443. We need to change this to a new port, such as 444.
- MySQL: The default is port 3306. We need to change this to a new port, such as 3307
1. Installing to separate folders
and XAMPP version 8.2 in the folder C:\ProgramFiles\xampp8.2
2. Keep one of the php executables in the PATH.
3. Change MySQL port for one of the XAMPP's MySQL.
e.g., I have changed the port to 3307 for the MySQL in the XAMPP8.0 in the following files:- Find the line port = 3306 and change to port = 3307.
4. Change Apache ports for one of the XAMPP's Apache.
- Find the line Listen 80 and change to Listen 8080.
- Also, find the line ServerName localhost:80 and change to ServerName localhost:8080.
- Find the line Listen 443 and change to Listen 444.
- Find the line <VirtualHost _default_:444> and change to <VirtualHost _default_:444>.
- Find the line ServerName localhost:443 and change to ServerName localhost:444.
5. Update the XAMPP Control Panel's port settings
In the XAMPP Control Panel, click the main Config button (the one at the top right of the window).Select Service and Port Settings, then go to the Apache tab.
Change the Main Port and SSL Port fields to our new values (e.g., 8080 and 444) and click Save.
Go to the MySQL tab and change the Main Port to our new value (e.g., 3307), then click Save.
6. Change the server port in PhpMyAdmin config:
Find the server configuration section. Look for a block of code that starts like this:$i = 0;
$i++;
e.g., I added the following line in the server configuration section in C:\ProgramFiles\xampp8.0\phpMyAdmin\config.inc.php
- $cfg['Servers'][$i]['port'] = '3307';
7. Restart the services:
Now, Apache will be listening to port 8080 and SSL 444, and MySQL will be using the port 3307 for the XAMPP 8.0; while XAMPP 8.2 will be using the default ports (i.e., Apache: 80 & SSL 443, and MySQL: 3306)
XAMPP 8.0's Apache server can be accessed via localhost:8080, while simply localhost will point to the Apache server of XAMPP 8.2
XAMPP 8.0's PhpMyAdmin can be accessed via localhost:8080\phpmyadmin, while localhost\phpmyadmin will point to the PhpMyAdmin of XAMPP 8.2
Comments
Post a Comment