Archive for : November, 2011

XAMPP – Create subdomain (virtualhost)

Edit Apache Config

The file is located “c:xamppapacheconfextrahttpd-vhosts.conf”:

Add this lines if not already exists:

DocumentRoot C:/xampp/htdocs/
ServerName localhost
ServerAdmin admin@localhost

Then add the following to have “” point to

<VirtualHost subdomain.localhost>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /home/httpd/htdocs/subdomain/
ServerAlias subdomain.localhost

Edit HOSTS File

You can find your HOSTS file in the “C:WindowsSystem32driversetc” directory

Open it up in a text editor, and add the following lines: subdomain.localhost