httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Hector <>
Subject RE: [users@httpd] Authentication for virtual host
Date Tue, 03 Dec 2002 09:32:42 GMT
On Tue, 2002-12-03 at 21:35, Boyle Owen wrote:
> Authentication is triggered by directory accesses so putting the Auth*
> directives in a directory container on the docroot will protect the
> whole site. I'm not sure what you mean by "aliases outside the tree"...
> You only authenticate once so after "logging in" to the homepage, it's
> immaterial whether content comes from outside the docroot. On the other
> hand, direct requests for resources under aliases will not lead to
> filesystem accesses under the docroot so will not trigger
> authentication. e.g.
> ServerName banana
> DocumentRoot /home/web/banana
> <Directory /home/web/banana>
>   AuthDirectivesHere...
> <Directory>
> Alias /kiwi /home/web/kiwi
> Then http://banana/page.html will trigger authentication but
> http://banana/kiwi/page.html (which will cause a filesystem access to
> /home/web/kiwi/page.html) will not.

That's what I thought. kiwi is potentially another virtual host, right
(inferred since it's living in /home/web/kiwi)?

I want http://banana/kiwi/page.html to require authentication, while
http://kiwi/page.html doesn't.

If I have something like this:


<VirtualHost livesite.domain>
  DocumentRoot /var/www/livesite
  ServerName livesite.domain

<VirtualHost testsite.domain>
  DocumentRoot /var/www/testsite
  ServerName testsite.domain
  <Directory /var/www/livesite>
  Alias /images /var/www/livesite/images

Will that serve up http://livesite.domain/images/logo.png without
authentication, while http://testsite.domain/images/logo.png requires
it? Even though it's the same file?

Basically I want the test site to just not work at all without

Unfortunately I didn't design the site; I'm doing some additional work
(like adding protection for the test site). I'm not sure I've grasped
all the complexities of the site yet; there may be more questions later



PS & OT: if you were going for a fruit theme, that should probably be
'kiwifruit'. A kiwi is a bird (though we New Zealanders use it to refer
to ourselves as well). :-)

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message