I have installed the latest xampp on my xp machine, i have no problems other then the fact i am a totally new to the whole 'virtual host' thing, i kinda got stuck and was hoping someone can tell me what i am doing wrong.
I followed a tutorial from the tutorial site, and tried to learn what i can from the various posts on the subject, i have one virtual host running okay, but how to enable more...this is where im stuck.
I want to have as many sites on localhost/virtualhost as possible, no outside internet connections or www.links, just all localhost testing websites for now.
I have my vhosts.conf like this:
- Code: Select all
# Use name-based virtual hosting.
#
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:/xampp/xampp/htdocs
ServerName localhost:80
ServerAdmin admin@localhost
</VirtualHost>
<VirtualHost *:80>
ServerName localhost.main.com
ServerAlias localhost.main.com *.localhost.main.com
ServerAdmin admin@domain1.co.uk
DocumentRoot C:/srv/www/yourdomain
<Directory "C:/srv/www/yourdomain">
Options ExecCGI Includes FollowSymLinks
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName localhost.main2.com
ServerAlias localhost.main2.com *.localhost.main2.com
ServerAdmin admin@domain2.co.uk
DocumentRoot C:/srv/www/yourdomain2
<Directory "C:/srv/www/yourdomain2">
Options ExecCGI Includes FollowSymLinks
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
My 'hosts' file:
- Code: Select all
127.0.0.1 localhost
127.0.0.1 yourdomain
127.0.0.1 yourdomain2
httpd.conf:
- Code: Select all
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
I can access localhost.main.com no problem, but how to setup the next virtual host has confused me i thought you make localhost.main2.com
or something similar??? thanks for any advice.