title: authz_dbd, multi user authentication and individual folders through .htaccess
body: <h2>Intro</h2>
  
  <p>Our apache2 setup serves files from a wide variety of folders using webdav, and use authz_dbd to communicate with a mysql database (this part works without problems). </p>
  
  <p>Summary:
  Apache2, mod_authz_dbd, mod_authn_dbd, mysql, enabling webdav, multi user environment (iot nodes).</p>
  
  <p>However... some of these folders are user specific. </p>
  
  <pre><code>folder1              admins
  +--subfolder1.1      admins+some other folk+user1
  +--subfolder1.2      admins+again other folk+user1
  folder2
  +--subfolder 2.1     same as 1.1 but with user2
  +--subfolder 2.2     as1.2.. but..user2
  </code></pre>
  
  <p>We use dbd-groups with wildcards, similar to this:</p>
  
  <pre><code>location /var/www/html/*/subfolder1.1 
   require dbd-group read
  </code></pre>
  
  <p>And normally wrote all in the vhosts file </p>
  
  <pre><code>(require user.. )
  </code></pre>
  
  <h2>The problem</h2>
  
  <p>This becomes too large, we need another fix.</p>
  
  <p>We cannot use .htaccess files in combination with dbd groups (dbd groups are not allowed in .htacces). Our debian (jessy) does not allow the other mysql apache2 mods.</p>
  
  <p>The combination of .htaccess files with dbd's mysql authorization does not work (dbd groups are not allowed in .htaccess). 
  Our debian server does not allow other mysql apache2 mods (like mod_auth_mysql).</p>
  
  <p>How can I combine mysql authorization with the folder specific users?</p>