Fun with Windows XP and WebDAV
I have an apache server in my basement, and I host sites for a number of people, including this blog. I've tried to give WebDAV access to my clients, but have had all sorts of headaches with accessing Apache2 WebDAV from Windows XP. Windows XP is supposed to support WebDAV pretty nicely (they call it Web Folders), but it's broken in a number of places.
I think I've figured out how to fix that.
The symptom is that a user tries to add a Web Folder from the Windows XP "My Network Places" window, using a URL of the form http://my.site.com/mydirectory.
For discussion's sake, say that their name is 'user', and their password is passwd.
They get a WebDAV authentication window, and they enter their name and password. The authentication window will say "Connecting to my.site.com" in both the titlebar and the message above the username and password fields. The authentication window comes right back, with a username of the form my.site.com\user prefilled in. They enter their password again, and the authentication window comes right back. They can't get into the site. Even if you've got entries for both "user" and "my.site.com\user" in your apache passwd file, it's no good.
You'll see this sort of stuff in the apache access log:
10.0.0.3 - - [06/Mar/2005:15:28:54 -0600] "PROPFIND /mydirectory HTTP/1.1" 401 529 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
10.0.0.3 - - [06/Mar/2005:15:28:54 -0600] "PROPFIND /mydirectory HTTP/1.1" 401 529 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
10.0.0.3 - - [06/Mar/2005:15:28:54 -0600] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
10.0.0.3 - - [06/Mar/2005:15:28:54 -0600] "PROPFIND /mydirectory HTTP/1.1" 401 529 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
And interestingly, you'll see nothing at all in the error log.
The secret is to add a port number to the URL - for instance, use:
http://my.site.com:80/mydirectory
rather than
http://my.site.com/mydirectory.
When you do this, you'll get the AuthName from your httpd.conf file in the authentication window above the username and password fields, and the username and password should work, without having to have my.site.com\ prepended to the username.
The theory is that Windows is trying mount this as a CIFS share rather than using WebDAV, and the port number in the URL forces it to be WebDAV, but your guess is as good as mine.