Hi Jeremy (maybe)
You need to enable the Named virtual hosts. Simply use the following syntax in the virtual hosts section of your config file.
# Use name-based virtual hosting.
NameVirtualHost *:80
Then use a block like this for each named server you want to run. You will need to set all the names and paths to suit your installation etc.
<VirtualHost *>
ServerName www.myname.co.uk
DocumentRoot D:/htdocs/www/myname.co.uk
ErrorLog D:/htdocs/www/myname.co.uk
CustomLog D:/htdocs/www/myname.co.uk
ScriptAlias /cgi-bin/ D:/cgi-bin/myname.co.uk/
# CGI directory exists, if you have that configured.
<Directory D:/cgi-bin/myname.co.uk>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
ServerAdmin webmaster@myname.co.uk
</VirtualHost>
Hope this helps
Colin.
Main Topics
Browse All Topics





by: caterham_wwwPosted on 2006-02-17 at 12:59:52ID: 15984625
Use in your server config section or inside a <virtualhost IP> the VirtualDocumentRoot directive from mod_vhost_alias
something like
UseCanonicalName Off
VirtualDocumentRoot /var/www/%2
an other option would be mod_rewrite, of course.
in your httpd.conf
RewriteEngine on
RewriteCond %{HTTP_HOST} ([^.]+)\.com
RewriteRule ^/(.*) /%1/$1 [L]