loader

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..

Step 1:

Go to the Xampp official website and install it. You can find the link over here

Step 2:

Open Xampp and Start Xampp from its control panel.

Step 3:

Open the D:\xampp\. Go to Apache Folder and go to Conf Folder(D:\xampp\apache\conf\). Open httpd.conf file

Step 4:

Make sure the httpd-vhosts.conf line is uncommented in httpd.conf


# Virtual hosts
Include conf/extra/httpd-vhosts.conf

Step 5:

Go to D:\xampp\apache\conf\extra and open httpd-vhosts.conf

Find and uncomment this line


NameVirtualHost *:80

Step 6:
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 >
  

Step 7:

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> 


Step 8:

Go to %windir%\system32\drivers\etc\ and open hosts as administrator and edit the below code


127.0.0.1    www.test

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.

Learn About Data Science using R programming and Python.

Leave a Reply