I'm trying to experiment with Webdav. So I've setup a simple configuration for that:
http {
...
client_body_buffer_size 128k;
client_body_temp_path /var/lib/nginx/client 1 2;
...
}
server {
listen 192.168.1.2:80;
server_name webdav.domain.com;
access_log /var/log/nginx/localhost.access.log main;
error_log /var/log/nginx/localhost.error.log error;
root /var/www/webdav;
location / {
auth_basic "Restricted Access";
auth_basic_user_file htpasswd;
dav_access user:rw group:rw all:rw;
dav_methods PUT DELETE MKCOL COPY MOVE;
autoindex on;
autoindex_exact_size off;
create_full_put_path on;
min_delete_depth 7;
}
}
When I open the http://webdav.domain.com/ link in Nautilus (CentOS 5.7), I get a popup to enter the username/password and then I get an error message:
Could not display "http://webdav.domain.com/".
The location is not a folder.
Am I missing something in the configuration? I tested the setup with a regular index.html file and the security popup shows and accepts my username/password so not something related to basic auth. However, when i look into logs, I see this:
2011/12/17 17:45:04 [error] 30059#0: *1 no user/password was provided for basic authentication, client: 192.168.1.1, server: webdav.domain.com, request: "HEAD / HTTP/1.1", host: "webdav.domain.com"
2011/12/17 17:49:39 [error] 30059#0: *2 no user/password was provided for basic authentication, client: 192.168.1.1, server: webdav.domain.com, request: "HEAD / HTTP/1.1", host: "webdav.domain.com"
Every time the request fails, 2 lines are added into logs.
Thank you for your help.