Howto get authorization in WebDAV/Apache to work


I've been trying to set up a webdav service on my Apache server. It all works (both from windows and Ubuntu) fine without the LimitExcept tags activated. But as soon as I activate those tags (no SSL involved yet) I keep getting the user/pass popup in IE and get a

"Cannot display location "dav://
HTTP Error: Moved Permanently"

in Ubuntu's "connect to server" client.

See the code section for relevant configuration/log files.

I created the DAVLock file and chown:ed it to www-data:www-data so that should not be an issue (should not) :|

Any help in this matter would be greatly appreciated.

As you can see from the dav_fs.conf I've tried different approaches to the LimitExcept tag (information I found from other threads).

/Joakim Carlsten
DAVLockDB /var/lock/apache2/DAVLock
#DAVLockDB /tmp/DAVLock
#DAVMinTimeout 600
Alias /davhome /var/www/davhome/
<Location /davhome/>
        Dav On
        AuthType Basic
        AuthName davuser
        AuthUserFile /var/www/.DAVlogin
   require valid-user
#        <LimitExcept GET OPTIONS>
#               Require valid-user
#        </LimitExcept>
#        <LimitExcept GET OPTIONS>
#                Require user davuser
#        </LimitExcept>
/var/log/apache2/access.log - - [15/Feb/2009:17:53:55 +0100] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600" - - [15/Feb/2009:17:56:38 +0100] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600" - - [15/Feb/2009:17:59:54 +0100] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600" - - [15/Feb/2009:18:11:19 +0100] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600" - - [15/Feb/2009:23:53:57 +0100] "GET / HTTP/1.1" 400 360 "-" "-" - - [16/Feb/2009:10:14:15 +0100] "PROPFIND /davhome davhome HTTP/1.1" 301 361 "-" "gnome-vfs/2.24.0 neon/0.25.4" - - [16/Feb/2009:10:14:15 +0100] "PROPFIND /davhome/ HTTP/1.1" 401 525 "-" "gnome-vfs/2.24.0 neon/0.25.4" - - [16/Feb/2009:10:14:15 +0100] "HEAD /davhome/ HTTP/1.1" 200 - "-" "gnome-vfs/2.24.0 neon/0.25.4" - - [16/Feb/2009:13:55:20 +0100] "PROPFIND /davhome davhome HTTP/1.1" 301 361 "-" "gnome-vfs/2.24.0 neon/0.25.4" - - [16/Feb/2009:13:55:20 +0100] "PROPFIND /davhome/ HTTP/1.1" 401 525 "-" "gnome-vfs/2.24.0 neon/0.25.4" - - [16/Feb/2009:13:55:20 +0100] "HEAD /davhome/ HTTP/1.1" 200 - "-" "gnome-vfs/2.24.0 neon/0.25.4" - - [16/Feb/2009:14:28:13 +0100] "OPTIONS /davhome HTTP/1.1" 301 361 "-" "gvfs/1.0.2"
[Sun Feb 15 07:11:54 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch configured -- resuming normal operations
[Sun Feb 15 07:11:54 2009] [info] Server built: Sep 19 2008 13:43:21
[Sun Feb 15 07:11:54 2009] [debug] prefork.c(1024): AcceptMutex: sysvsem (default: sysvsem)

Open in new window

Who is Participating?
drexlAuthor Commented:
The problem was solved with the tutorial found here

On page two it goes through the steps for connecting from win xp and the tip about including the port number is what solved the puzzle.

Try to set 'LogLevel' to 'debug'
Michael WorshamInfrastructure / Solutions ArchitectCommented:
I wrote an article/document on how to do this under RHEL/CentOS, which can be adapted for your Apache environment.
drexlAuthor Commented:
I've checked the LogLevel and it was already set to 'debug'.

Mwecomputers: Thanks for the tip, but I've aldeady reached the point where it is activated and works (without authorization). I still took a quick look at the document and it seemed to propose the same approach as the one I've taken.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.