Howto get authorization in WebDAV/Apache to work

Hi,

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://davuser@xx.xxx.xx.xxx/davhome
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
/etc/apache2/mods-enabled/dav_fs.conf
 
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
 
<LimitExcept GET HEAD OPTIONS>
   require valid-user
</LimitExcept>
 
#        <LimitExcept GET OPTIONS>
#               Require valid-user
#        </LimitExcept>
 
#        <LimitExcept GET OPTIONS>
#                Require user davuser
#        </LimitExcept>
</Location>
 
/var/www/.DAVlogin
davuser:jqOz0v1PD72zo
 
 
/var/log/apache2/access.log
xx.xxx.xx.xxx - - [15/Feb/2009:17:53:55 +0100] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
xx.xxx.xx.xxx - - [15/Feb/2009:17:56:38 +0100] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
xx.xxx.xx.xxx - - [15/Feb/2009:17:59:54 +0100] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
xx.xxx.xx.xxx - - [15/Feb/2009:18:11:19 +0100] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
xx.xxx.xx.xxx - - [15/Feb/2009:23:53:57 +0100] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 360 "-" "-"
xx.xxx.xx.xxx - - [16/Feb/2009:10:14:15 +0100] "PROPFIND /davhome davhome HTTP/1.1" 301 361 "-" "gnome-vfs/2.24.0 neon/0.25.4"
xx.xxx.xx.xxx - - [16/Feb/2009:10:14:15 +0100] "PROPFIND /davhome/ HTTP/1.1" 401 525 "-" "gnome-vfs/2.24.0 neon/0.25.4"
xx.xxx.xx.xxx - - [16/Feb/2009:10:14:15 +0100] "HEAD /davhome/ HTTP/1.1" 200 - "-" "gnome-vfs/2.24.0 neon/0.25.4"
xx.xxx.xx.xxx - - [16/Feb/2009:13:55:20 +0100] "PROPFIND /davhome davhome HTTP/1.1" 301 361 "-" "gnome-vfs/2.24.0 neon/0.25.4"
xx.xxx.xx.xxx - - [16/Feb/2009:13:55:20 +0100] "PROPFIND /davhome/ HTTP/1.1" 401 525 "-" "gnome-vfs/2.24.0 neon/0.25.4"
xx.xxx.xx.xxx - - [16/Feb/2009:13:55:20 +0100] "HEAD /davhome/ HTTP/1.1" 200 - "-" "gnome-vfs/2.24.0 neon/0.25.4"
xx.xxx.xx.xxx - - [16/Feb/2009:14:28:13 +0100] "OPTIONS /davhome HTTP/1.1" 301 361 "-" "gvfs/1.0.2"
 
 
/var/log/apache2/error.log
[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

drexlAsked:
Who is Participating?
 
drexlAuthor Commented:
The problem was solved with the tutorial found here
http://www.howtoforge.com/how-to-set-up-webdav-with-apache2-on-ubuntu-8.10

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.



add-network-place-wizard.JPG
0
 
ht-docsCommented:
Try to set 'LogLevel' to 'debug'
0
 
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.

http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Q_24043953.html
0
 
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.
0
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.