It's being a week I'm trying to get webdav working on a Vhost without any success....
**Here is my setup:**
Debian 9
Apache 2.4
Virtualmin 6.01
SuexecUserGroup "#1039" "#1038"
ServerName dav.mydom.com
DocumentRoot /home/dav/public_html
ErrorLog /var/log/virtualmin/dav.mydom.com_error_log
CustomLog /var/log/virtualmin/dav.mydom.com_access_log combined
<Directory "/home/dav/public_html">
Options Indexes MultiViews
AllowOverride None
Require all granted
</Directory>
Alias /webdav /home/dav/public_html
<location /webdav>
Dav on
AuthType Basic
AuthBasicProvider file
AuthName "WebDav"
AuthUserFile /home/dav/public_html/.htpasswd
<Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK OPTIONS>
Require valid-user
</Limit>
</location>
ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://localhost:8005/home/dav/public_html/$1
RemoveHandler .php
RemoveHandler .php7.0
php_admin_value engine Off
Trying to test it with cadaver, I got the message I can't even enter my user name and pass
[matth@www ~]# cadaver http://dav.mydom.com/webdav/
Authentication required for WebDav on server `dav.mydom.com':
Username:
Authentication aborted!
Could not open collection:
Could not authenticate to server: rejected Basic challenge
dav:/webdav/?
I have also tested by creating a .netrc pass to authenticate automatically but i good this then:
[matth@www ~]# cadaver https://dav.mydom.com/webdav
Could not access /webdav/ (not WebDAV-enabled?):
405 Method Not Allowed
Connection to `db.ducorporation.com' closed.
dav:!>
**access.log**
s.r.c.ip - - [18/Jan/2018:04:03:29 +0100] "OPTIONS /test.txt HTTP/1.1" 200 4236 "-" "Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0"
s.r.c.ip - - [18/Jan/2018:04:03:30 +0100] "HEAD /test.txt HTTP/1.1" 200 620 "https://app.dom.com/" "Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0"
s.r.c.ip - - [18/Jan/2018:04:03:31 +0100] "OPTIONS /test.txt HTTP/1.1" 200 1146 "-" "Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0"
s.r.c.ip - - [18/Jan/2018:04:03:32 +0100] "HEAD /test.txt HTTP/1.1" 200 620 "https://app.dom.com/" "Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0"
s.r.c.ip - - [18/Jan/2018:04:03:32 +0100] "OPTIONS /test.txt HTTP/1.1" 200 1146 "-" "Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0"
s.r.c.ip - - [18/Jan/2018:04:03:33 +0100] "PUT /test.txt HTTP/1.1" 405 938 "https://app.dom.com/" "Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0"
**error.log** is empty
With suexec i'm making sure Apache is running under the proper user, also the access to any files does work from a Web browser after authentication.
Also tested
- not to use ``location`` but ``directory``
- Disable Directory indexing
- Auth none/Digest/Basic
- Webdav folder at the route of the DocumentRoot as well as sub-folder
- Changed ownership of the public_html folder to the apache user
- Some other thing i don't remember
*With all these tests, I'm getting the same error*
Done my testing with Firefox/litmus/cadaver/webdav client app
With Firefox and the webdav app I'm able to read and download files but not edit ``PUT`` get as a ``405 error`` (meaning ``PUT`` is not allowed, but it's allowed in my ``<Limit>`` section)
With litmus/cadaver no chance to do anything so far…
Hope I'm clear enough
Any input would be much appreciated
Matth