Nginx - enable directory listing

written by justin on December 22nd, 2007 @ 07:22 PM

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;
    }
  }
}

Comments

  • ERik on 17 Jan 19:42

    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.
  • Justin on 19 Jan 11:28

    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.

Comments are closed