Dear Reader in This Tutorial let us We Know that “How we can Create Virtual Host in XAMPP Server”, So in this Tutorial, We Learn Step By Step Virtual Host Creation Process.
Virtual hosting is a method for hosting multiple domain names. This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname.
There are two types of Virtual Hosts–
i) Name Based Virtual Server
ii) IP Based Virtual Server
At First, I am going to assume that you’re using a Windows machine and have XAMPP Server installed
Step 1:-. You need to go your Computer drive where you installed Operating System and find the hosts file by following the bellow path
Open a file in any editor and after making changes in the file you try to save file you should get a warning message, this message you got because this is a protected file
Step 2:- Now if you want to changes in that file you need to open that file in notepad++ when you open that file in notepad++ and after changes you want to save that file you see a bellow message as open that file as an Administrator mode, you need to click Yes.
Step 3:- When you open hosts file as an Administrator mod then type the below code
save that file
Step 4:- Now open XAMPP Server
Step 5:- you need to click config then click Browse Apache
Step 6:- At this step click on conf
Step 7:- Now click on extra
Step 8:- Here you can see a file “httpd-vhosts.conf” open that file
Step 9:- At this step, you need to type the below code in your file as-
You can also see below snapshot
Step 10:- Start your XAMPP Server because you change in Apache Server Files
Step 10:- Congratulations you have successfully created a Virtual host, Now you type URL in Browser like
you can see the result
Step 11:- Finally you can also run your project using your chosen domain name like
If you have any query then please comment below, Thanks..