apache2 Webdav using VirtualDocumentRoot
- by picca
I'm trying to get up dynamical WebDav on my virtual hosts
<VirtualHost *:80>
# http://www.example.com/test.txt -> /var/www/example.com/www/test.txt
VirtualDocumentRoot /var/www/%-2.0.%-1.0/%-3+/
<Location /webdav>
Dav On
AuthType Basic
AuthName "example.com"
AuthUserFile /var/www/[PROBLEM-1]/passwd.dav
Require valid-user
</Location>
</VirtualHost>
Is there any way I can set dynamically PROBLEM-1 placeholder based on whatever comes with *HTTP_HOST*? More precisely part of it? Example:
HTTP_HOST = www.example.com - PROBLEM-1 = example.com
HTTP_HOST = example.com - PROBLEM-1 = example.com
What I'm trying to do here is to load dav passwd file dynamically based on which domain is requested. It is something like "groups" if you wish. So that owner of domainA is not allowed to access files of domainB. So maybe there is some other solution based on AuthGroupFile directive?