Question

setup webdav with nginx on Ubuntu 12.04

  • Posted March 8, 2014

I’m trying to setup webdav access on my Ghost droplet; I’ve read all the information I can find, and done the following:

  1. installed nginx-extras
  2. created a separate directory for dav in /var/www/dav/, and set permissions to www-data
  3. added a new server directive to the nginx config; it looks like this:

server { listen 80; server_name site.com www.site.com;

client_max_body_size 10M;

location / {
        proxy_pass http://localhost:2368/;
        proxy_set_header Host $host;
        proxy_buffering off;
}

}

server { listen 8080; server_name site.com;

client_max_body_size 20M;

location / { 
    dav_methods PUT DELETE MKCOL COPY MOVE;
    dav_ext_methods PROPFIND OPTIONS;
    dav_access group:rw all:r;

    root /var/www/dav/;
    auth_basic "Restricted";
    auth_basic_user_file /var/www/dav/.htpasswd;

}

}

  1. setup basic http auth with htpasswd

I’ve checked this setup from a console on the droplet, using cadaver; the authentication works, and a test upload worked.

But trying to connect from my mac (using Cyberduck, Firefox, mount_webdav) all fail. Can anyone help? What am I doing wrong?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

there are no connect requests to the log. From this I’m guessing it’s an iptables/fail2ban error. <br> <br>going to start a separate thread for that.

update: I tried cadaver from my Mac and it fails as well; so there is some problem with connecting dav from any other machine but the droplet… <br> <br>I must note that the Node+Ghost proxy is working; but this second server block seems not to. <br> <br>There are no nginx init errors. Going to take a look at the nginx log next.