setup webdav with nginx on Ubuntu 12.04

Posted March 8, 2014 31.5k views
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; client_max_body_size 10M; location / { proxy_pass http://localhost:2368/; proxy_set_header Host $host; proxy_buffering off; } } server { listen 8080; server_name; 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; } } 4. 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?

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.

Submit an Answer
2 answers
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...

I must note that the Node+Ghost proxy is working; but this second server block seems not to.

There are no nginx init errors. Going to take a look at the nginx log next.
there are no connect requests to the log. From this I'm guessing it's an iptables/fail2ban error.

going to start a separate thread for that.