Re: Can we use include directive inside location directive ???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux