I'm trying to enable HTTP-DAV on Apache (httpd.x86_64 2.2.3-43.el5.centos) running on CentOS 5.4.

I have the following relevant entries in my httpd.conf

LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so

<IfModule mod_dav_fs.c>    
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

<Location /var/www/html/updates>
    Dav On
</Location>

/var/www/html/ is the apache root. I have reloaded apache without any errors in the error log. I can also access this dir via HTTP in Firefox

I have an application under development which needs to communicate with the web server over HTTP-DAV but instead reports that the web server returned "(405) Method not allowed". This happens when it sends a PROPFIND request.

Apache's access log reports the following when that happens

192.168.1.29 - - [25/Nov/2010:17:21:26 +0200] "PROPFIND /updates/2.0.1.0/ HTTP/1.1" 405 320 "-" "-"

Presumably HTTP-DAV isn't enabled. What am I doing wrong?

Edit in reply to pacey: There are no Limit or LimitExcept Directives in any of apache's conf files. There is no .htaccess file in /var/www/html/updates/ or /var/www/html/

Edit in reply to Zoredache: Apache has write access to updates

Edit in reply to iiegn: I gave cadaver a try. Apparently WebDAV's not enabled.

dav:!> open http://hybrid/updates/
Could not access /updates/ (not WebDAV-enabled?):
405 Method Not Allowed
Connection to `hybrid' closed.

The only relevant thing in the logs (LogLevel debug) is in the access log:

192.168.1.240 - - [26/Nov/2010:14:41:45 +0200] "OPTIONS /updates/ HTTP/1.1" 200 - "-" "cadaver/0.22.3 neon/0.25.5"
192.168.1.240 - - [26/Nov/2010:14:41:45 +0200] "PROPFIND /updates/ HTTP/1.1" 405 319 "-" "cadaver/0.22.3 neon/0.25.5"
link|improve this question

are there any <Limit> or LimitExcept Directives in the apache configuration? – pacey Nov 25 '10 at 15:50
maybe the error log will tell you more? – Mike Nov 25 '10 at 16:04
Does the apache user have write access to /updates/? – Zoredache Nov 25 '10 at 21:21
is there a .htaccess file in the path to /var/www/html/updates which gets evaluated? If so, what are the contents. – pacey Nov 26 '10 at 9:30
feedback

2 Answers

up vote 2 down vote accepted

Finally figured it out

Instead of

<Location /var/www/html/updates>
    Dav On
</Location>

it needs to be

<Directory /var/www/html/updates>
   Dav On
</Directory>
link|improve this answer
hm, then there seems to be some interaction with, i guess, /var/www being DocRoot or other (Directory) settings further up the path. i have dav working on a <Location /some/path> with /some/path not being part of any other setting. – iiegn Nov 26 '10 at 13:51
I have the same problem (405 error) but I am using Directory. – Brad Aug 4 '11 at 18:37
Thanks - this helped me too. – Lord Loh. Feb 1 at 21:53
feedback

the set-up seems sufficient.

to test the set-up you could try cadaver, the command-line WebDAV client for Unix: http://www.webdav.org/cadaver/ . there, start with something like "> open URL" to see whether you can open a connection. then, "> propget ." or "> ls"

...and with the PROPFIND request pay attention to: http://httpd.apache.org/docs/2.2/mod/mod_dav.html#davdepthinfinity.

link|improve this answer
+1 for suggesting cadaver – Manos Dilaverakis Nov 26 '10 at 13:39
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.