Apache WebDAV Configuration
Author: Samuel Williams When: Wednesday, 01 April 2009April 2009
May 2009
August 2009
September 2009
October 2009
- Building a Concrete Bath
- LED Lighting Comparison
- Thinking about Programming Languages
- How To Be A Consultant
- Lucid Programming Dojo
- Exim4 + ClamAV + SpamAssassin
- Secure login using AJAX
- Ramaze And Rack
- ActiveMerchant
- Concurrency And Immutability
- Floating Point Numbers
- Programming And Debugging
- Useful jQuery Plugins
- Loading Anonymous Ruby Classes
- 尺八 (Shakuhachi)
- Card Trick
- Object Oriented C
- Gemcutter
- Writing Clearly
- Richard Stallman In Christchurch
- Magnatune
- Client Side Graphing
- Zena CMS
November 2009
February 2010
March 2010
April 2010
May 2010
June 2010
July 2010
August 2010
September 2010
December 2010
January 2011
March 2011
May 2011
August 2011
September 2011
WebDAV is a very useful tool for sharing files. If you want to have both anonymous access and authenticated access, you require some specific configuration:
<VirtualHost *> # ... standard configuration ... # ServerName, DocumentRoot, etc # Root DAV which requires authentication to access: <Location "/MyFiles/"> DAV on AuthType Digest AuthName "Digest Realm" AuthUserFile /etc/apache2/users/myfiles.htdigest Require user me <LimitExcept GET HEAD OPTIONS REPORT PROPFIND> Require user me </LimitExcept> </Location> # Specific folder which can be accessed anonymously (read-only) <Location "/MyFiles/Public/"> <Limit GET HEAD OPTIONS REPORT PROPFIND> Allow from all Satisfy any </Limit> </Location> # Specific folder which can be accessed anonymously (read/write) <Location "/MyFiles/DropBox/"> Allow from all Satisfy any </Location> </VirtualHost>
The key here is understanding how Limit and LimitExcept can be used. Limit means that for the given set of requests, process the block. LimitExcept means that for any other type of request other than those given, process the block. The thing to identify is that Satisfy any can then be used within a Limit or LimitExcept block to control anonymous access. This can be used, along with typical Allow from all access controls to provide fine grained access to DAV repositories.
See also
- Apache Core Documentation (
Satisfy any,Limit,LimitExcept,Require) - mod_access Documentation (
Allow from any) - mod_dav Documentation (
DAV)
Comments
Please note, you can leave a comment that uses (limited) XHTML and Textile syntax.