I just wrote a whole bunch here and, somehow, I managed to lose everything.
Gah!.
Anyway, open your hosts file, on Vista this is usually located at
C:/windows/System32/drivers/etc. Add the following line to it:
You may see other lines in this file such as
127.0.0.1 localhost.
Save this file and close it.
Now, in the latest releases of XAMPP, they have a special file for virtual hosts - I cannot confirm this for earlier releases. This file can be located at
<xampp dir>/apache/conf/etc/httpd-vhosts.conf. Open this file and add the following to it:
-
NameVirtualHost *:80
-
-
<VirtualHost *:80>
-
ServerName localhost
-
# Point to your root folder for localhost
-
DocumentRoot "C:\xampp\htdocs"
-
DirectoryIndex index.php index.html index.html index.htm index.shtml
-
</VirtualHost>
-
-
<VirtualHost *:80>
-
ServerName yourturn.com
-
# Point to your root folder for yourturn.com
-
DocumentRoot "C:\xampp\htdocs\yourturn.com\htdocs"
-
DirectoryIndex index.php index.html index.html index.htm index.shtml
-
</VirtualHost>
Restart apache, and navigate to
http://yourturn.com. You should be greeted with the directory you specified in the virtual host.
Hope this helps,
Markus.