httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Allen <j...@klam.ca>
Subject [users@httpd] Macros + Require constructs
Date Thu, 16 Jun 2016 03:30:26 GMT
I am trying to setup up a webdav serve.  Each user is allocated a 
directory (%location) and an id (%user). In order to try and make this 
some what easier to administer I wrote the following macro

<Macro WebDavUser %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 user %user

     </Directory>

</Macro>

Users are added to a simple file which is included in the webdav config 
file.

         Use WebDavUser ProjectA  john
         Use WebDavUser ProjectB  kathleen
         Use WebDavUser ProjectC jack

This works quite nicely. However I am trying to work out how I can make 
this work when there is no specific user. For example if I were to 
provide a common area ("Common")

         Use WebDavUser Common ?

Would the following be secure enough, is there another "better" way of 
doing this?

         <RequireAny>
                  Require valid-user
                  Require user %user
          </RequireAny>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message