Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First, for you other readers, my authentication was done against Django using a <a href="http://www.davidfischer.name/2009/10/django-authentication-and-mod_wsgi/" rel="nofollow">WSGI authentication script</a>.</p> <p>Then, there's the meat of the question, giving each Django user, in this case, their own WebDav dir separated from other users. Assuming the following WebDAV setup in the Apache virtual sites configuration (customarily in <em>/etc/apache2/sites-enabled/</em>)</p> <pre><code>&lt;Directory /webdav/root/on/server&gt; DAV On # No .htaccess allowed AllowOverride None Options Indexes AuthType Basic AuthName "Login to your webdav area" Require valid-user AuthBasicProvider wsgi WSGIAuthUserScript /where/is/the/authentication-script.wsgi &lt;/Directory&gt; </code></pre> <p>Note how there's no public address for WebDav set up yet. This, and the user area thing, is fixed in two lines in the same config file (put these after the ending clause):</p> <pre><code>RewriteEngine On RewriteRule ^/webdav-url/(.*?)$ /webdav/root/on/server/%{LA-U:REMOTE_USER}/$1 </code></pre> <p>Now, webdav is accessed on <a href="http://my-server.com/webdav-url/" rel="nofollow">http://my-server.com/webdav-url/</a> The user gets a login prompt and will then land in a subdirectory to the webdav root, having the same name as their username. <em>LA-U:</em> makes Apache "look ahead" and let the user sign in <em>before</em> determining the mounting path, which is crucial since that path depends on the user name. Without some rewrite-rule there will be no URL, and the user won't get a login prompt. In other words, LA-U avoids a catch-22 for this type of login handling.</p> <p><strong>Precautions</strong>: requires mod_rewrite to be enabled, and user names must be valid as dir names without any modification. Also, the user dirs won't be created automatically by these commands, so their existence must be assured in some other way.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload