Setting up multiple website in xampp is very easy, as it provides you the flexibility to work on multiple projects in different languages and Platforms like WordPress, MariaDB, PHP, and Perl etc.
XAMPP is the most popular PHP development environment which is free, Open source and easy to Install. It is to build an easy to install distribution for developers to get into the world of Apache.
Apache is one of the most popular web server which contains MariaDB, PHP, Perl etc.
Lets Get Started..
Go to the Xampp official website and install it. You can find the link over here
Open Xampp and Start Xampp from its control panel.
Open the D:\xampp\. Go to Apache Folder and go to Conf Folder(D:\xampp\apache\conf\). Open httpd.conf file
Make sure the httpd-vhosts.conf line is uncommented in httpd.conf
# Virtual hosts Include conf/extra/httpd-vhosts.conf
Go to D:\xampp\apache\conf\extra and open httpd-vhosts.conf
Find and uncomment this line
Add the following at the bottom of httpd-vhosts.conf
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "D:\xampp\htdocs\test" ServerName www.test #ServerAlias www.test // uncomment based on your requirments. ErrorLog "logs/test.localhost-error.log" CustomLog "logs/test.localhost-access.log" combined <Directory "D:\xampp\htdocs\test"> DirectoryIndex index.php Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost >
Go to D:\xampp\apache\conf\and open httpd.conf
Add the following at the bottom of httpd.conf
<Directory "D:\xampp\htdocs\test"> DirectoryIndex index.php Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all Require all granted </Directory>
Go to %windir%\system32\drivers\etc\ and open hosts as administrator and edit the below code
Now Restart the Xampp. Go to your browser and type the hostname www.test or www.test:80 (or your defined port number)
Similarly, You can replicate the directory with the same settings above and host multiple sites in your localhost.
For more blogs click here.
Learn About Umbraco.