From b79debb72746211ec60a89e25925620bc5c73b69 Mon Sep 17 00:00:00 2001 From: Brock Tice Date: Tue, 26 May 2015 09:30:30 -0600 Subject: [PATCH 1/2] Added fix to allow access to all files under owncloud webdav. --- conf/nginx.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index bf204a6a..feb8e65f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -54,6 +54,13 @@ server { alias /var/lib/mailinabox/mozilla-autoconfig.xml; } + # Allow everything in owncloud webdav + location ^~ /cloud/remote.php/webdav/.* { + log_not_found off; + access_log off; + allow all; + } + # Disable viewing dotfiles (.htaccess, .svn, .git, etc.) location ~ /\.(ht|svn|git|hg|bzr) { log_not_found off; From d4002338dd859419900842648fbac14c07bf224d Mon Sep 17 00:00:00 2001 From: Brock Tice Date: Wed, 27 May 2015 10:33:24 -0600 Subject: [PATCH 2/2] Modify dotfile regex so that it skips over paths including .php files. --- conf/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index bf204a6a..8c0c9a61 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -54,8 +54,8 @@ server { alias /var/lib/mailinabox/mozilla-autoconfig.xml; } - # Disable viewing dotfiles (.htaccess, .svn, .git, etc.) - location ~ /\.(ht|svn|git|hg|bzr) { + # Disable viewing dotfiles (.htaccess, .svn, .git, etc.), but not under php-controlled pages + location ~ ^/(?!.*\.php).*/\.(ht|svn|git|bzr)$ { log_not_found off; access_log off; deny all;