This site is now 100% read-only, and retired.

Question: WebDAV with Apache2 - including Windows XP?

Posted by simonw on Wed 26 Oct 2005 at 13:49

How do I configure Apache2 Webdav to work with Windows XP? I have WebDAV up and working with cadaver, so I know the basics are there. But XP insists of trying to login as DOMAIN\Username instead of Username.

A quick search shows various references to "redirect-carefully", but only one reference to this on the Official Apache documentation site, which says it fixes troubles with Microsoft clients!

I found various suggestions (include Debian bug #155097) to add a "BrowserMatch" directive for browsers matching;

"Microsoft Data Access Internet Publishing Provider"
"^WebDrive"

(and indeed some GNOME based WebDAV clients need tender loving care as well).

Adding this doesn't solve the issue - do I need to reboot XP - or is there a better explanation somewhere.

Caltech guys suggest this for Apache 1. http://www.hss.caltech.edu/help/unix/admin/web/apache-webdav-xp

Ironically when we get it working we may well decide change it all to work with authentication against ADS, although I'm thinking the LDAP Authentication to ADS looks prettier than relying on "winbind" and "smbd". But I think one step at a time.

Oh the perils of making Debian talk to the evil empire.

Someone suggested making the username "vhost-domain\username" using "htpasswd htpasswd vhost-domain\\username" but that didn't work either.

What am I missing?

 

 


Re: Question: HowTo WebDAV with Apache2 - difficult clients (includin
Posted by skiold (84.121.xx.xx) on Wed 26 Oct 2005 at 16:00
There are some fixes.

On the xp side you have to append to the url the port number or a '#' character (i.e. http://davserver:80/ or http://davserver/#).

On the apache2 side i'm using your extra BrowserMatch directives, plus mod_header, and mod_encoding with the following :

Header add MS-Author-Via "DAV"
EncodingEngine on
NormalizeUsername on

I was lucky, my dav is on a port other than 80 and by default every xp client had the port set on the url.

[ Parent ]

Re: Question: HowTo WebDAV with Apache2 - difficult clients (includin
Posted by chris (80.203.xx.xx) on Mon 7 Nov 2005 at 14:45
[ View Weblogs ]
Been trying this since before this article - and I still get nowhere :(

Apache2 - with dav and dav_fs modules loaded.

Here's the test DAV config (culled from a combination of this article, links from it and google searches):
DAVLockDB /var/lock/apache2/DAVLock

BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "Microsoft-WebDAV-MiniRedir/5.1.2600" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS" redirect-carefully


  Header add MS-Author-Via "DAV"



   EncodingEngine on
   NormalizeUsername on


Alias /dav /tmp/dav


  Dav On

  AuthType Digest
  AuthName DAV
  AuthDigestDomain /dav/ DAV

  AuthDigestFile /etc/apache2/dav.digest

  
     require valid-user
  

Tested http://host/dav, http://host:80/dav, http://host/dav/, http://host:80/dav/ - all fail. Anything with a # in it XP pro says is an invalid location. Anyone see what's wrong? All works fine with cadaver from linux and from win2k - just not XP.

[ Parent ]

Re: Question: HowTo WebDAV with Apache2 - difficult clients (includin
Posted by lawrencewal (24.18.xx.xx) on Sun 20 Nov 2005 at 22:34
I found a cheap and easy fix, try this,
user: username@domain.com
password: xxxxxx

the @ seems to trick xp into sending the right username.
If not then xp sends the username mixed up with the hostname
eg lawrencehostname.com instead of just lawrence

[ Parent ]

Re: Question: HowTo WebDAV with Apache2 - difficult clients (includin
Posted by Anonymous (142.165.xx.xx) on Mon 10 Jul 2006 at 20:53
I've looked at all the links and all the "fixes" here and not one will work for me with a fresh install of XP Pro SP2. The # and :80 fixes give me "the folder does not appear to be valid".

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by suspended user jpfsanders (213.52.xx.xx) on Wed 26 Oct 2005 at 16:20
Forgive my ignorance (I'm not a very seasoned linux user) you say:

I'm thinking the LDAP Authentication to ADS looks prettier than relying on "winbind" and "smbd".

And here comes the surprise, it is possible to speak to AD without winbind?
that LDAP thingy, is it more reliable?
Where can I find a tutorial?

Thanks

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by simonw (84.45.xx.xx) on Wed 26 Oct 2005 at 18:22
[ View Weblogs ]
"it is possible to speak to AD without winbind?"

ADS provides an LDAP interface, as such it is presumably possible to talk to it like you would any other LDAP server.

I haven't done it, but there are various documents, link below is a discussion of someone having some trouble, as you see it is a pretty vanilla LDAP config. I saw several others, I see nothing that looks like "embrace and extend".

http://www.gossamer-threads.com/lists/apache/users/278806

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by Anonymous (206.106.xx.xx) on Wed 2 Nov 2005 at 02:14
I see nothing that looks like "embrace and extend".

Even with SFU, none of the attributes quite match the names in the rfc-defined schema, so you have to re-map all the ones you need for NSS to be able to find them

nss map attribute RFC-name MSSFU-name

[ Parent ]

[Off-Topic] A nice client
Posted by Anonymous (200.115.xx.xx) on Fri 28 Oct 2005 at 03:22
Yeah... I know. This is NOT an answer for the question. But I didn't use to read about WebDav. I want to recomend a very nice client davfs2. It permite mount WebDav resources like disks.

Just that.. :D

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by Anonymous (194.150.xx.xx) on Fri 28 Oct 2005 at 14:15
Try HTTPS instead of HTTP - works for me!

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by Anonymous (62.84.xx.xx) on Thu 28 Sep 2006 at 08:59
This is what solved it for me aswell, apparently a bug in XP.

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by Anonymous (213.132.xx.xx) on Wed 9 Nov 2005 at 13:55
this
http://ulihansen.kicks-ass.net/aero/webdav/

is a fine analysis of the problem and an overview of some solutions. one of them worked very easy for me:

it appears the windowsxp webdav driver has various problems. but you can *trick* windowsxp into using the 'old' windows2000 webdav driver. the old driver worked with our apache1.3 without *any* modifications, no BrowserMatch directives, no mod_header, no mod_encoding.


the new driver
is called Microsoft-WebDAV-MiniRedir/5.1.2600
and looks like this: http://ulihansen.kicks-ass.net/aero/webdav/redir.jpg

the old driver
is called Microsoft Data Access Internet Publishing Provider DAV 1.1
and look like this http://ulihansen.kicks-ass.net/aero/webdav/provider.jpg

adding :80 to the domain name or # after the path of a webdav request spawns the old driver.

$2c,
*pike

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by Anonymous (195.226.xx.xx) on Thu 10 Nov 2005 at 12:23
using the above hints, the code snipplet below from my <xxx>.conf still results in

Syntax error on line 25 of /etc/apache2/sites-enabled/<xxx>:
EncodingEngine not allowed here


<xxx>.conf:
...
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "Microsoft-WebDAV-MiniRedir/5.1.2600" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS" redirect-carefully


<ifmodule mod_headers.c>
Header add MS-Author-Via "DAV"
</ifmodule>

<ifmodule mod_encoding.c>
EncodingEngine on
NormalizeUsername on
</ifmodule>
...

Anybody has any ideas how to invoke The EncodingEngine for libapache2-mod-encoding?

Regards,
Marc

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by Anonymous (148.202.xx.xx) on Thu 25 May 2006 at 21:13
Making the username "vhost-domain\username" using "htpasswd htpasswd vhost-domain\\username" do not work but...

making the username "username@something.com" with htpasswd
and using the same with WinXP client does it !!

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by Anonymous (72.85.xx.xx) on Tue 6 Mar 2007 at 20:52

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by Anonymous (213.140.xx.xx) on Sun 6 Apr 2008 at 01:31
Hi
I know this is a little old but I'm posting hoping it may help someone .

I tried several server side fix without any success ( nothing in the logs made me think windows even tried to authenticate ) .

Windows webfolders
-I managed to connect using https : it doesn't allow me to create new files while I can create new dirs ( very odd & strange )

Windows remote drive
-I managed to connect mixing a couple of client side solutions : first created the registry key as of http://ulihansen.kicks-ass.net/aero/webdav/ ( mentioned earlier in this thread ) , rebooted windows and added user@domain.com with htpasswd . Please note that I had to connect using plain http since using ssl was returning an error saying it could not find the site ( https://documents.mysite.com/webdav ) -- VERY STRANGE since it works with webfolders .



Hope this helps


Marco Ferretti ( marco.ferretti@fermasoft.com )

[ Parent ]

Re: Question: WebDAV with Apache2 - including Windows XP?
Posted by Anonymous (89.176.xx.xx) on Thu 7 Aug 2008 at 16:43
Have spent with this issue the whole day. Wonderful! ;-)

What did not work for me:
=========================
- Mod_Auth_MSFix - was not able to make it loaded into Apache 2.2
- mod_encoding.so - - was not able to make it loaded into Apache 2.2
(loading of both modules ended with "Syntax error on line 132 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_encoding.so into server: The specified module could not be found." - of course the modules WERE in the directory. Strange.)
- playing with ports i.e. adding :80 into URL
- playing with "#" character i.e. adding of slash to the end of the URL


What *DID* work for me:
========================
- As Marco, I managed to connect mixing a couple of client side solutions : first created the registry key as of http://ulihansen.kicks-ass.net/aero/webdav/ ( mentioned earlier in this thread ), rebooted windows and added user@domain.com with htpasswd.

(Having Windows XP SP2, Apache 2.2)

Thanks for all the comments. This website is also very helpful.

[ Parent ]