These forums are read-only!
Nginx + WebDAV
  • Been trying to get Nginx to serve up a WebDAV repository for days now with no luck. I've poured through the NginxHttpDavModule docs to no avail. Seems that things fail when the DAV client tries to do an OPTIONS request (my logs are reading that an HTTP 405 error occurs). Any idea? I compiled Nginx myself and included the WebDAV module. The DAV potion of my config file looks like so:

    server {
            listen 80;
            server_name localhost;
    
            access_log /home/roshambo/dav/log/access.log;
            error_log /home/roshambo/dav/log/error.log;
    
            charset utf-8;
    
            client_body_temp_path client_body_temp;
    
            autoindex on;
    
            location / {
                    root /home/roshambo/dav/public;
                    dav_methods PUT DELETE MKCOL COPY MOVE;
                    dav_access user:rw group:rw all:r;
                    create_full_put_path on;
            }
    }
    
  • pretty sure the nginx webdav module doesn't support OPTIONS, not PROPFIND for that matter.

    If you do some searching, you will find a few people who use a cgi script to handle the unsupported commands. I haven't tried that avenue myself though.

  • Yeah, Nginx's WebDAV module supports only a subset of the full DAV protocol and definitely not OPTIONS and PROPFIND. Is CGI really the only way to get a semi-operable WebDAV resource? Nonetheless, thanks for the tip -- would've never thought of that as a way to handle it otherwise.

    What I'm really after is a way to share GIT repositories over HTTP. Any help would be much appreciated.

  • You could have nginx proxy to apache. Kind of annoying, but it will work.
  • So after a bit more research I've concluded that DAV on Nginx is too incomplete for practical use. That is, they still have to finish the DAV implementation. So, you're right Lorax -- I'm going to have to proxy to Apache. Thanks for the help, Gents.