httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wayne <wa...@jawnee.org>
Subject [users@httpd] dynamic/mass virtual hosts with www.* alias and localhost...
Date Wed, 06 May 2009 02:04:39 GMT
ahoy all,

    	i have been trying/searching/etc unsuccessfully to do the following
(what i believe to be) simple task:

enable mass/dynamic virtual hosts, allowing each virtual host to be
accessed via example.com AND www.example.com, without creating a
VirtualHost directive for each host.

    	my attempts have centered on first enabling dynamic virtual hosting
with:

NameVirtualHost *
UseCanonicalName Off
VirtualDocumentRoot /var/www/sites/%0/www
VirtualScriptAlias /var/www/sites/%0/cgi-bin

which works fine.  i can access all the sites listed in /var/www/sites/
(once they are added to /etc/hosts of course, in both their
www.example.com and example.com forms).  then, i attempt to make a
VirtualHost directive for the default host that lists the alias:

<VirtualHost *>
	ServerName default
	ServerAlias www.*
	DocumentRoot /var/www/
</VirtualHost>

unfortunately this does nothing.  the virtual hosts are only accessible
via their domain names WITHOUT the www. prefix.

	in addition, i can no longer access the default DocumentRoot via
localhost or 127.0.0.1.  i believe this is a hint to my problem, as it
seems the VirtualHost directive is not overriding the dynamic/mass
virtual hosting.

	here are my details: running Apache/2.2.8 (Ubuntu) Mar 10 2009 18:09:05
on Ubuntu Hardy 8.04 with kernel 2.6.24-23 and all latest updates
applied.  i have tried it with/without the default "sites-enabled"
Debian config, to no luck.

	i would appreciate any help with this, or if it is even possible.  it
has been a few days of trying with no luck.

thanks, wayne.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message