Re: Apache dynamically configured mass virtual hosting
I'm making heavy use of the vhost_alias module on my web
server... In fact config specific for it is as follows:
LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so
UseCanonicalName Off
NameVirtualHost [My Web Servers IP]
<VirtualHost [My Web Servers IP]>
<IfModule mod_vhost_alias.c>
VirtualDocumentRoot /var/www/%3/%2/%1
VirtualScriptAlias /var/www/%3/%2/cgi-bin/%1
</IfModule>
</VirtualHost>
Now I do some mod_rewrite rules to make sure everything comes
as a 3 part hostname (host.sld.tld) so when it receives a query for say
http://www.example.org/ it will look in /var/www/org/example/www for the
DocumentRoot and /var/www/org/example/cgi-bin/www for any /cgi-bin/
references...
With this setup 'apache -S' returns:
VirtualHost configuration:
[My Web Server IP] is a NameVirtualHost
default server [server hostname] (/etc/apache/httpd.conf:1067)
port 80 namevhost [server hostname] (/etc/apache/httpd.conf:1067)
So from what you did provide the only difference it seems is
that I'm using NameVirtualHost... And have my mod_vhost directives
within the <VirtualHost> block...
Jeremy
On Tue, Feb 19, 2002 at 05:04:37PM +0100, J. Paul Bruns-Bielkowicz wrote:
> Hi,
> I'm trying to setup apache for dynamically configured mass virtual hosting.
> I've followed the documentation explicitly.
>
> LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so
> UseCanonicalName Off
> LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
> CustomLog logs/access_log vcommon
> VirtualDocumentRoot /www/hosts/%0/docs
> VirtualScriptAlias /www/hosts/%0/cgi-bin
>
> After stopping and restarting apache output for apache -S
> is:
> VirtualHost configuration:
>
> There don't seem to be any virtual hosts. All I get is error 404 regardless
> of whether I use the IP address or www.name.server.org
>
> My server is Apache/1.3.22 (Unix) Debian GNU/Linux mod_ssl/2.8.5
> OpenSSL/0.9.6a PHP/4.1.1
>
> Any suggestions are welcome.
> Thanks,
> J. Paul Bruns-Bielkowicz
> http://www.america.prv.pl
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: