I configured Apache2 to allow WebDav on a directory (CentOS 5 / Plesk 8.6):
- WebDav is enabled in httpd.conf
- /var/lib/dav/lockdb is writeable by Apache
- My target dir is chmod 777
- My target dir is chowned apache:psacln
- using Basic Authentication (setup by Plesk interface)
in my vhost.conf I have:
<Directory /var/www/vhosts/domain.com/httpdocs/target_dir> Dav On AllowOverride none Order allow,deny Allow from all </Directory>
I can connect to the directory using authentication fine and download files from it. But I cannot write to the dir. I get a 403 Error when I attempt to upload or create a dir.
Anyone have any tips?
Thanks in advance -
Update - 6/5 Using the comments below I've isolated the issue to being some type of conflict with .htpasswd protected directories. I can created an unprotected dir and enable WebDAV uploads fine. But once I enable Basic Auth on the directory everything goes south. I can read but no longer upload.
This is my vhost.conf:
<Directory /var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/> AuthUserFile /var/www/.htpasswd AuthName "Login" AuthType Basic Require valid-user DAV on AllowOverride none <Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> Require valid-user </Limit> </Directory>
Was able to get WebDAV working on a different domain with minimal effort. The only difference between the two domains is that in the one which refuses to allow write access I have a DocumentRoot directive:
Might this be causing some problems?