XAMPP specific port for specific folder
By default xampp ports are 80 and 443. If you have many project and want to setup project with difference port in xampp called “Virtual Hosts” this is how to setup virtual host in xampp for difference port.
Now we want to add port 81 for C:\xampp\htdocs\whois
Step 1 : Update “C:\xampp\apache\conf\httpd.conf” add new listening port. Add this line after Listen 80
Listen 81
Step 2: Update “C:\xampp\apache\conf\extra\httpd-vhosts.conf” add new virtual host config. If you want to
<VirtualHost *:81>
DocumentRoot "C:\xampp\htdocs\whois"
ServerName 127.0.0.1:81
</VirtualHost>
Step 3 : Update “C:\Windows\System32\drivers\etc\hosts” add new host and port in this file. Add bellowe code after # ::1 localhost
127.0.0.1 127.0.0.1:81
Step 4 : Restart apache and test 127.0.0.1:81 in browser.