Click to See Complete Forum and Search --> : Apache VirtualHosts


Robo82
05-13-2008, 03:50 AM
Hi I'm really stuck here.

Ok i have a server running xampp and need to have multiple sites as sub domains from http://preview.domain.co.uk e.g.

http://preview.domain.co.uk/play

The trouble is I have a landing page for http://preview.domain.co.uk and a site at /play but when I go to /play it doesn't direct me to the webroot as I've stated in my config below, can anyone see any problems I may have?

Thanks


NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
DocumentRoot C:/xampp/htdocs/
ServerName preview.domain.co.uk
ServerAdmin admin@preview.domain.co.uk
</VirtualHost>

<VirtualHost preview.domain.co.uk>
DocumentRoot C:/xampp/htdocs/play/webroot
ServerName preview.domain.co.uk
ServerAdmin admin@preview.domain.co.uk
<Directory "C:/xampp/htdocs/play/webroot">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
RewriteEngine on
RewriteCond $1 !^(index_site\.php|lib|catalogue)
RewriteRule ^(.*)$ /index_site.php/$1 [L]
</Directory>
</VirtualHost>