Search This Blog

Saturday, October 29, 2011

How to create virtual host In XAMPP in windows

1.Create a folder in C:\xampp\htdocs\mysite
2. Edit your hosts file in windows  located in C:\WINDOWS\system32\drivers\etc\ and add following line mysite.localhost
Don’t delete the existing “ localhost” line
3.Open your C:\xampp\apache\conf\extra\httpd-vhosts.conf file and add the following lines

NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs"
    ServerName localhost

<VirtualHost *:80>
    ServerName mysite.localhost
    DocumentRoot C:\xampp\htdocs\mysite
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
4. Reboot your computer .You should now be able to access each dev domain by way of:

No comments: