You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mick Ken <mi...@gmail.com> on 2008/08/08 19:54:15 UTC
[users@httpd] Can we use include directive inside location directive ???
Hi Friends,
I have lot's of location tags like these:
<Location /Project1>
DAV svn
SVNPath C:/Projects1/
AuthName "Projects1"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain mydomain
SSPIOfferBasic On
SSPIUsernameCase lower
Require valid-user
AuthzSVNAccessFile "C:/svn/svn-acl"
</Location>
<Location /Project2>
DAV svn
SVNPath C:/Projects2/
AuthName "Projects2"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain mydomain
SSPIOfferBasic On
SSPIUsernameCase lower
Require valid-user
AuthzSVNAccessFile "C:/svn/svn-acl"
</Location>
....
....
and I was just wondering if I can take out the common part and put it
into one common tag and include it thereafter for easier maintenance
e.g I would like to take this part out from each tag:
DAV svn
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain mydomain
SSPIOfferBasic On
SSPIUsernameCase lower
Require valid-user
AuthzSVNAccessFile "C:/svn/svn-acl"
Is this possible using the include directive or some other directive????
Thanks
Mick
---------------------------------------------------------------------
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] Can we use include directive inside location directive
???
Posted by André Warnier <aw...@ice-sa.com>.
Mick Ken wrote:
> Hi Friends,
> I have lot's of location tags like these:
>
> <Location /Project1>
> DAV svn
> SVNPath C:/Projects1/
> AuthName "Projects1"
> AuthType SSPI
> SSPIAuth On
> SSPIAuthoritative On
> SSPIDomain mydomain
> SSPIOfferBasic On
> SSPIUsernameCase lower
> Require valid-user
> AuthzSVNAccessFile "C:/svn/svn-acl"
> </Location>
>
> <Location /Project2>
> ....
> and I was just wondering if I can take out the common part and put it
> into one common tag and include it thereafter for easier maintenance
> e.g I would like to take this part out from each tag:
>
...
I have no idea if this would work, if it's a bug, what version of Apache
you're using etc..
But..
there was a question on this forum a little while ago, where someone
wanted to "protect" his whole site, but unprotect one sub-part of the
site, like
<Location />
Authxxx something
etc..
</Location>
<Location /public>
(should be free)
</Location>
So basically, he wanted the opposite of what you want.
It turned out that the Auth specs for the / location appeared to be
"inherited" by the /public location (so he could not do what he wanted
to do).
But in your case, it may be worth a try :
<Location /Project>
> DAV svn
> AuthType SSPI
> SSPIAuth On
> SSPIAuthoritative On
> SSPIDomain mydomain
> SSPIOfferBasic On
> SSPIUsernameCase lower
> Require valid-user
> AuthzSVNAccessFile "C:/svn/svn-acl"
</Location>
<Location /Project1>
(what's specific to 1)
</Location>
<Location /Project2>
(what's specific to 2)
</Location>
and, maybe, /Project1 will "inherit" the common part from /Project ?
(assuming they really start with the same prefix of course)
Please tell the result.
I don't want to hijack your question, but I find that it is, in general,
an item relatively vague in the Apache 2.x documentation. It does say
in which order the <Directory>, <Location>, <Files> etc.. are evaluated,
but I don't think it explicitly says what happens when several
<Location> or <LocationMatch> sections *could* apply to a URL. Do their
specs for instance get "cumulated" ? Or does Apache finaly pick one and
one only, and applies only the specs of that one ?
Maybe another guru here can tell ?
> DAV svn
> AuthType SSPI
> SSPIAuth On
> SSPIAuthoritative On
> SSPIDomain mydomain
> SSPIOfferBasic On
> SSPIUsernameCase lower
> Require valid-user
> AuthzSVNAccessFile "C:/svn/svn-acl"
>
> Is this possible using the include directive or some other directive????
>
> Thanks
> Mick
>
> ---------------------------------------------------------------------
> 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
>
---------------------------------------------------------------------
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] Can we use include directive inside location directive ???
Posted by Eric Covener <co...@gmail.com>.
On Fri, Aug 8, 2008 at 1:54 PM, Mick Ken <mi...@gmail.com> wrote:
> Is this possible using the include directive or some other directive????
The manual says "Include" works in "directory" context, which includes
<Location> -- try it and see.
You might also be interested in LocationMatch or mod_authn_alias.
--
Eric Covener
covener@gmail.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