01-Mar-2022
.
Admin
In this article, I am going to learn you how to create virtual host in xampp windows. We will will get how to create or the setup virtual host in windows. i will show how you can setup and configure virtual hosts for drupal website with XAMPP running on windows. This tutorial will give easy and simple way to create or setup virtual host in xampp windows.
Here i will give you full example for how to create & setup virtual host in windows with XAMPP Server step by step easy way configuration vhost in your windows So let's follow bellow step by step.
Step 1 : Create Virtual Host
In this step, You can open C:/xampp/apache/conf/extra/httpd-vhosts.conf file Then, edit httpd-vhosts.conf with any text editor. In my case, I am using Notepad++.
Now put the bellow code at last in this file.
C:/xampp/apache/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs/my_pro" // Your Project Folder Path
ServerName my_pro.localhost
<Directory "c:/xampp/htdocs/my_pro"> // Your Project Folder Path
</Directory>
</VirtualHost>
Step 2 : Add Host
In the last step, we will open C:\Windows\System32\drivers\etc\hosts
File and add your servername at the end of file.
127.0.0.1 my_pro.localhost
Now run your xampp server and start your apache and mysql service. Then open your browser run your project.
my_pro.localhost
It will help you...
#Windows