Here is a quick guide on how to create multiple subdomain in your localhost using XAMPP
Open your XAMPP control panel and click explore. This will take you to your XAMPP installation directory.
Now go to Apache > Conf > Extra then locate and open ‘httpd-vhosts.conf’file.
NOTE: Create a backup of the file before editing.
In httpd.xampp.conf file add this line for subdomain support :
<VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/subdomain" ServerName subdomain.localhost.com </VirtualHost>
Go to C:\WINDOWS\system32\drivers\etc -> “hosts” file and add:
Now, go back to your XAMPP control panel and restart apache by clicking the designated stop button then afterwards the start button.
Go to your browser and type in the address bar : http://subdomain.localhost.com
That should be working perfectly 🙂
Happy coding! 😀