You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kelly Price <st...@gmail.com> on 2005/08/02 04:50:39 UTC
[users@httpd] Strange problem with mod_vhost_alias
I'm having a strange problem with mod_vhost_alias here, which doesn't
match the documentation.
My intentions are to map these sample domains on one server to these
directories:
web.stalag99.net => /home/hosts/stalag99_net/w/e/b/web/public_html/
stalag99.net => /home/hosts/stalag99_net/w/e/b/web/public_html
OR /home/hosts/stalag99_net/_/_/_/_/public_html (if I'm reading
the docs right)
anydomain.dotsig.org => /home/hosts/dotsig_org/a/n/y/anydomain/public_html
www.canmephwar.co.uk => /home/hosts/co_uk/c/a/n/canmephwar/public_html
In reality, I have like 8000 domains, mostly .comicgenesis.com but
with www.stalag99.net, www.kisai.org, www.kisai.ca,
www.digitalwar.co.uk, etc in the mix.
The particular line:
VirtualDocumentRoot /home/hosts/%-2_%-1/%-3.1/%-3.2/%-3.3/%-3/public_html
In testing, using to report the actual file accessed at the end of the
log line...
LogFormat "%V %h %l %u %t \"%r\" %s %b %f" vcommon
CustomLog logs/access_log vcommon
I get this in my access log (one per request, of course, all pointing locally):
web.stalag99.net 127.0.0.1 - - [01/Aug/2005:22:46:52 -0400] "GET /
HTTP/1.1" 403 290 /home/hosts/stalag99_net
stalag99.net 127.0.0.1 - - [01/Aug/2005:22:47:06 -0400] "GET /
HTTP/1.1" 403 286 /home/hosts/stalag99_net
It looks like it's cutting off past %-3.1 and beyond. Changing to:
VirtualDocumentRoot /home/hosts/%0/public_html
works as usual.
I think I've found a bug. Apache 2.0.54, on a Gentoo Linux box.
--
Kelly "STrRedWolf" Price
http://strredwolf.furrynet.com
---------------------------------------------------------------------
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
Re: [users@httpd] Strange problem with mod_vhost_alias
Posted by FSA <we...@proxy.ro>.
are u trying to put the log files in separte dir's for each vhost ? or
i don't understand the problem ?
Kelly Price wrote:
> I'm having a strange problem with mod_vhost_alias here, which doesn't
> match the documentation.
>
> My intentions are to map these sample domains on one server to these
> directories:
> web.stalag99.net => /home/hosts/stalag99_net/w/e/b/web/public_html/
> stalag99.net => /home/hosts/stalag99_net/w/e/b/web/public_html
> OR /home/hosts/stalag99_net/_/_/_/_/public_html (if I'm reading
> the docs right)
> anydomain.dotsig.org => /home/hosts/dotsig_org/a/n/y/anydomain/public_html
> www.canmephwar.co.uk => /home/hosts/co_uk/c/a/n/canmephwar/public_html
>
> In reality, I have like 8000 domains, mostly .comicgenesis.com but
> with www.stalag99.net, www.kisai.org, www.kisai.ca,
> www.digitalwar.co.uk, etc in the mix.
>
> The particular line:
> VirtualDocumentRoot /home/hosts/%-2_%-1/%-3.1/%-3.2/%-3.3/%-3/public_html
>
> In testing, using to report the actual file accessed at the end of the
> log line...
> LogFormat "%V %h %l %u %t \"%r\" %s %b %f" vcommon
> CustomLog logs/access_log vcommon
>
> I get this in my access log (one per request, of course, all pointing locally):
> web.stalag99.net 127.0.0.1 - - [01/Aug/2005:22:46:52 -0400] "GET /
> HTTP/1.1" 403 290 /home/hosts/stalag99_net
> stalag99.net 127.0.0.1 - - [01/Aug/2005:22:47:06 -0400] "GET /
> HTTP/1.1" 403 286 /home/hosts/stalag99_net
>
> It looks like it's cutting off past %-3.1 and beyond. Changing to:
>
> VirtualDocumentRoot /home/hosts/%0/public_html
>
> works as usual.
>
> I think I've found a bug. Apache 2.0.54, on a Gentoo Linux box.
>
Re: [users@httpd] Strange problem with mod_vhost_alias
Posted by Kelly Price <st...@gmail.com>.
On 8/2/05, Nick Kew <ni...@webthing.com> wrote:
> Kelly Price wrote:
> > I'm having a strange problem with mod_vhost_alias here, which doesn't
> > match the documentation.
>
> I haven't read the documentation for that, so can't help with diagnosing
> whether it's a bug or your problem.
>
http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html
> > My intentions are to map these sample domains on one server to these
> > directories:
> > web.stalag99.net => /home/hosts/stalag99_net/w/e/b/web/public_html/
> > stalag99.net => /home/hosts/stalag99_net/w/e/b/web/public_html
> > OR /home/hosts/stalag99_net/_/_/_/_/public_html (if I'm reading
> > the docs right)
> > anydomain.dotsig.org => /home/hosts/dotsig_org/a/n/y/anydomain/public_html
> > www.canmephwar.co.uk => /home/hosts/co_uk/c/a/n/canmephwar/public_html
>
> Do you really need that kind of hashing? The technique dates back to
> when filesystems used linear lookup within a directory. Nowadays I'd
> just use a hashed filesystem and not worry about big/flat directories.
>
I'm not sure what FreeBSD uses. I could use ReiserFS if the
production server was Linux. However, I got over 8000 users on the
server -- thankfully all flat file so CGI isn't a problem.
> > In reality, I have like 8000 domains, mostly .comicgenesis.com but
> > with www.stalag99.net, www.kisai.org, www.kisai.ca,
> > www.digitalwar.co.uk, etc in the mix.
> >
> > The particular line:
> > VirtualDocumentRoot /home/hosts/%-2_%-1/%-3.1/%-3.2/%-3.3/%-3/public_html
> >
> > In testing, using to report the actual file accessed at the end of the
> > log line...
> > LogFormat "%V %h %l %u %t \"%r\" %s %b %f" vcommon
> > CustomLog logs/access_log vcommon
> >
> > I get this in my access log (one per request, of course, all pointing locally):
> > web.stalag99.net 127.0.0.1 - - [01/Aug/2005:22:46:52 -0400] "GET /
> > HTTP/1.1" 403 290 /home/hosts/stalag99_net
> > stalag99.net 127.0.0.1 - - [01/Aug/2005:22:47:06 -0400] "GET /
> > HTTP/1.1" 403 286 /home/hosts/stalag99_net
>
> Hmmm. That's 403 (forbidden) rather than no-such-file.
> What's your actual documentroot (as opposed to virtualdocumentroot)?
>
/var/www/localhost/htdocs
That shouldn't matter, though. If I change the VirtualDocumentRoot to
/home/hosts/%0/public_html, and create a
/home/hosts/stalag99.net/public_html, I get a directory index.
--
Kelly "STrRedWolf" Price
http://strredwolf.furrynet.com
---------------------------------------------------------------------
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
Re: [users@httpd] Strange problem with mod_vhost_alias
Posted by Nick Kew <ni...@webthing.com>.
Kelly Price wrote:
> I'm having a strange problem with mod_vhost_alias here, which doesn't
> match the documentation.
I haven't read the documentation for that, so can't help with diagnosing
whether it's a bug or your problem.
> My intentions are to map these sample domains on one server to these
> directories:
> web.stalag99.net => /home/hosts/stalag99_net/w/e/b/web/public_html/
> stalag99.net => /home/hosts/stalag99_net/w/e/b/web/public_html
> OR /home/hosts/stalag99_net/_/_/_/_/public_html (if I'm reading
> the docs right)
> anydomain.dotsig.org => /home/hosts/dotsig_org/a/n/y/anydomain/public_html
> www.canmephwar.co.uk => /home/hosts/co_uk/c/a/n/canmephwar/public_html
Do you really need that kind of hashing? The technique dates back to
when filesystems used linear lookup within a directory. Nowadays I'd
just use a hashed filesystem and not worry about big/flat directories.
> In reality, I have like 8000 domains, mostly .comicgenesis.com but
> with www.stalag99.net, www.kisai.org, www.kisai.ca,
> www.digitalwar.co.uk, etc in the mix.
>
> The particular line:
> VirtualDocumentRoot /home/hosts/%-2_%-1/%-3.1/%-3.2/%-3.3/%-3/public_html
>
> In testing, using to report the actual file accessed at the end of the
> log line...
> LogFormat "%V %h %l %u %t \"%r\" %s %b %f" vcommon
> CustomLog logs/access_log vcommon
>
> I get this in my access log (one per request, of course, all pointing locally):
> web.stalag99.net 127.0.0.1 - - [01/Aug/2005:22:46:52 -0400] "GET /
> HTTP/1.1" 403 290 /home/hosts/stalag99_net
> stalag99.net 127.0.0.1 - - [01/Aug/2005:22:47:06 -0400] "GET /
> HTTP/1.1" 403 286 /home/hosts/stalag99_net
Hmmm. That's 403 (forbidden) rather than no-such-file.
What's your actual documentroot (as opposed to virtualdocumentroot)?
--
Nick Kew
---------------------------------------------------------------------
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