28 Oct, 2017

How to Create Virtual Host in XAMPP Server

28 Oct, 2017

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

C:\Windows\System32\drivers\etc\hosts

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

How-to-create-virtual-host-on-XAMPP-Server-step-1

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

like

save that file

 

Step 4:- Now open XAMPP Server

How-to-create-virtual-host-on-XAMPP-Server-step-4

Step 5:-  you need to click config then click Browse Apache

How-to-create-virtual-host-on-XAMPP-Server-step-5

 

Step 6:- At this step click on conf

How-to-create-virtual-host-on-XAMPP-Server-step-6

Step 7:- Now click on extra

How-to-create-virtual-host-on-XAMPP-Server-step-7

Step 8:- Here you can see a file “httpd-vhosts.conf” open that file

How-to-create-virtual-host-on-XAMPP-Server-step-8

Step 9:- At this step, you need to type the below code in your file as-

like

You can also see below snapshot

How-to-create-virtual-host-on-XAMPP-Server

Step 10:- Start your XAMPP Server because you change in Apache Server Files

How-to-create-virtual-host-on-XAMPP-Server-step-9

Step 10:-  Congratulations you have successfully created a Virtual host, Now you type URL in Browser like

localhost/your_project_name/file_name

like

localhost/ci_demo/home

you can see the result

How-to-create-virtual-host-on-XAMPP-Server-step-10

Step 11:-  Finally you can also run your project using your chosen domain name like

www.your_domain_name.com

like

www.cidemo.com

How-to-create-virtual-host-on-XAMPP-Server-step-11

If you have any query then please comment below, Thanks..

«
»

2 Comments:

  • asics kayno April 25, 2018

    I actually wanted to construct a simple comment to thank you for the remarkable secrets you are giving here. My considerable internet search has at the end been recognized with high-quality ideas to talk about with my family and friends. I would believe that many of us visitors actually are undoubtedly lucky to be in a remarkable website with many perfect individuals with helpful opinions. I feel really lucky to have encountered your entire web page and look forward to many more entertaining times reading here. Thank you once more for a lot of things.

    Reply

    • Webpreparations Team April 25, 2018

      Thank you so much 🙂

      Reply

Leave a comment:

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