Changes

Jump to navigation Jump to search
no edit summary
Line 1: Line 1: −
There is plenty of help on the web regarding how to set up a webdav area on an Apache 2.0 server using the mod_dav apache module.  If this is enabled on an area of the site secured with SSL/TLS (reachable by urls beginning with https:) there are a few extra steps, also widely documented.  What was not so easy to figure out how to do was how to do client authentication based on client certificates.  Most of the sites out there assume that people should use http basic authentication and type passwords all of the time.  I wanted to use my client certificate instead.  The short answer is that it is only possible if there is only one certificate used to access the webdav area.  In this case, one can configure the webdav directory as follows.
+
There is plenty of help on the web regarding how to set up a webdav area on an Apache 2.0 server using the mod_dav apache module.  If this is enabled on an area of the site secured with SSL/TLS (reachable by urls beginning with https:) there are a few extra steps, also widely documented.  What was not so easy to figure out how to do was how to do client authentication based on client certificates.  Most of the sites out there assume that people should use http basic authentication and type passwords all of the time.  I wanted to use my client certificate instead.  The short answer is that it is only possible if you are willing to configure a separate webdav area for each user.  In this case, one can configure the webdav directory as follows.
 
<pre>
 
<pre>
<Directory "/home/www/dav/">
+
Alias /davusers/newman/ "/home/www/davusers/newman/"
 +
<Directory "/home/www/davusers/newman/">
 +
    DAV On
 +
    SSLVerifyClient on
 +
    SSLVerifyDepth  10
 +
    SSLRequire %{SSL_CLIENT_S_DN_CN} =~ m/^Alfred E\. Newman/
 +
</Directory>
 +
</pre>
 +
What I decided to do in the end was to have just one shared webdav area for all users, and use basic http authentication based on passwords.
 +
<pre>
 +
Alias /davusers/ "/home/www/davusers/"
 +
<Directory "/home/www/davusers/">
 
     DAV On
 
     DAV On
 
     AuthType Basic
 
     AuthType Basic
Line 7: Line 18:  
     AuthUserFile /home/www/.htpasswd/webdav.htpasswd
 
     AuthUserFile /home/www/.htpasswd/webdav.htpasswd
 
     <LimitExcept OPTIONS>
 
     <LimitExcept OPTIONS>
         Require user webdav
+
         Require user jonesrt
 
     </LimitExcept>
 
     </LimitExcept>
 
     SSLVerifyClient off
 
     SSLVerifyClient off
 
</Directory>
 
</Directory>
 
</pre>
 
</pre>
 +
Note the trailing slashes on all of the webdav area directories, both actual and alias.  These slashes are necessary in order to be compatible with the Windows XP explorer webdav interface.

Navigation menu