How to create a virtual host in apache server


How to create a virtual host in apache server


     First you have to go to xammp directory . and access apache configuration files.


Xammp->apache->conf->extra-> httpd-vhosts.conf


      And run notepad as Administrator and open “httpd-vhosts.conf”





And create a new virtual host

You can give a Document root and also a server name (the document root should be your project path and give a server name you need)
And save it .





 Now you have to create a port number to your virtual host.

Lest move on to the windows directory and access the system32 files.
use following path.

Windows->system32->drivers->etc-> host




Open “host” file in notepad (make shure you have to run notepad as a Administrator)
change as following





Then save it.

After this you can check your new host on your browser.

Restart apache server and lest check it out on your browser.

Then it will open .
Thank you







Comments

Popular Posts