How to make a virtual host in Xampp/Wamp server

Share on facebook
Share on google
Share on twitter
Share on linkedin

Let’s see how virtualhost are created in Xampp, although this is very similar in any version of Apache.

Step 1. Enter the file C:\xampp\apache\conf\httpd.conf and add or uncomment the include of the virutal hosts file:

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

Step 2. Enter the file C:\xampp\apache\conf\extra\httpd-vhosts.conf and add the virtualhosts, in my case I will create a virtualhosts, one for a new project created with laravel.

<VirtualHost *:80>   
    DocumentRoot "C:/xampp/htdocs/laravel"
    <Directory "C:/xampp/htdocs/laravel">
        Options Indexes FollowSymLinks     
        AllowOverride All
        Order Deny,Allow
        Allow from all     

Step 3. Add to the hosts file of our system, in the case of Windows C:\Windows\System32\drivers\etc\hosts , and add the IP and url.

What we are telling you is that when we load any of those domains we call the IP that we indicate in this case instead of the original IP of the domain if it has one.

Now if we go to we will open the web we have in our directory www

Laravel Project virtual host

More to explorer

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.