Use xampp3.2.2 to configure multiple listening ports and different site directories under Windows
One: Configure Apache file httpd.conf
Open Apache configuration file httpd.conf, which can be opened by clicking on Apache (httpd.conf) under Xampp Apache CONFIG.
First in Listen 80
The following add a listening port as
Listen 8001Listen 8002
Then insert the last position in the httpd.conf:
NameVirtualHost *:8001<VirtualHost *:8001>ServerName localhost:8001DocumentRoot "D:/xampp/htdocs1"</VirtualHost>NameVirtualHost *:8002<VirtualHost *:8002>ServerName localhost:8002DocumentRoot "D:/xampp/htdocs2"</VirtualHost>
Then put the following places
Modified to:
<Directory /> #AllowOverride none #Require all denied Order deny,allow Allow from all</Directory>
Close the file httpd.conf.
Two: Open windows 8001, 8002 port
You can set up new rules, such as outbound rules, advanced settings, Windows Firewall.
Three: New Site Directory folder
Four: Restart Apache service five: Browser view results
Http://localhost:8001/index.html
Http://localhost:8002/index.html
Copyright NOTICE: Welcome Reprint 75646344
Bill: Use xampp3.2.2 to configure multiple listening ports and different site directories under Windows