Nginx - enable directory listing
When setting up webdav using nginx I was having difficulties with access denied. It turned out to be the denial of a directory listing. This solved it:
autoindex on;
webdav config for nginx:
server {
listen 80;
server_name miniserv;
autoindex on;
location / {
root /home/public;
client_body_temp_path /tmp/client_temp;
dav_methods PUT DELETE MKCOL;
create_full_put_path on;
dav_access group:rw all:r;
auth_basic "Private";
auth_basic_user_file conf/htpasswd;
limit_except GET {
allow 192.168.0.0/24;
deny all;
}
}
}
2 comments
Comments
-
Hi, What version of nginx are you using? I can't get webdav to work at all using this example. I am trying nginx out because i found the latest stable release of lighttpd was crashing when using webdav to access and I didn't get much help on their forums. thanks.
-
nginx version: nginx/0.5.34
This is just a piece of the config file. Make sure you have a working config before adding this piece.
Twitter