We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Howto get authorization in WebDAV/Apache to work

Medium Priority
2,123 Views
Last Modified: 2013-12-06
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

Comment
Watch Question

Commented:
Try to set 'LogLevel' to 'debug'

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Michael WorshamCloud/Infrastructure Solutions Architect
CERTIFIED EXPERT
Commented:
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

Author

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.
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
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.