httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Allen <>
Subject Re: [users@httpd] Re: CLOSED - Re: [users@httpd] Macros + Require constructs
Date Sat, 18 Jun 2016 19:03:51 GMT

On 2016-06-18 12:04 PM, @lbutlr wrote:
> On Jun 16, 2016, at 8:56 PM, John Allen <> wrote:
>> On 2016-06-15 11:52 PM, John Allen wrote:
>>> I just did some testing and it doesn't work as I had hoped. the Require valid-user
is applied in all cases not just in the case of the Common space!
>>> I had tried
>>> <RequireAny>
>>>          <RequireAll>
>>>                      Require expr %Location =~ "Common"
>>>                      Require valid-user
>>>          </RequireAll>
>>>          Require user %user
>>> </RequirwAny>
>>> But it did not work. What Am I missing?
>> I found a solution to the problem, not quite how I wanted to do things but it works.
> Is it a secret solution?
No.  I just did not think it was important enough to publish, sorry. So 
my macro now looks like this:

<Macro WebDav_User %location %user>
# %location
     Alias /%location /srv/webdav/data/%location
     <Directory /srv/webdav/data/%location>
         DAV On
         Options +Indexes +MultiViews +FollowSymLinks
         IndexOptions -IconsAreLinks +NameWidth=* +FancyIndexing +FoldersFirst +HTMLTable

         IndexOrderDefault Ascending Name
         DirectoryIndex disabled
         AllowOverride None
         DavDepthInfinity on
         DavMinTimeout 600

         AuthType Digest
         AuthName "webdav"
         AuthDigestProvider socache file
         AuthUserFile /srv/webdav/auth.d/digest_pw
         AuthnCacheProvideFor file
         AuthnCacheTimeout 600
         AuthnCacheContext webdav
                 Require expr %{REQUEST_URI} =~ m#^/Common#
                 Require valid-user
                 Require user %user

Interestingly, without the RequireAll around the "Require user %user" it does not work.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message