diff --git a/conf/nginx-primaryonly.conf b/conf/nginx-primaryonly.conf index db353d36..74967eb2 100644 --- a/conf/nginx-primaryonly.conf +++ b/conf/nginx-primaryonly.conf @@ -11,18 +11,22 @@ rewrite ^/cloud/(contacts|calendar|files)$ /cloud/index.php/apps/$1/ redirect; rewrite ^(/cloud/core/doc/[^\/]+/)$ $1/index.html; location /cloud/ { - - access_log /var/log/owncloud/access.log; - error_log /var/log/owncloud/error.log; - alias /usr/local/lib/owncloud/; location ~ ^/(data|config|\.ht|db_structure\.xml|README) { deny all; } + location ~ ^/((caldav|webdav|carddav).*)$ { + # Don't log requests that uses DAV (results in heavy spam) + access_log off; + } } location ~ ^(/cloud)(/[^/]+\.php)(/.*)?$ { # note: ~ has precendence over a regular location block + + access_log /var/log/owncloud/access.log; + error_log /var/log/owncloud/error.log; + include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/local/lib/owncloud/$2; fastcgi_param SCRIPT_NAME $1$2; @@ -42,10 +46,6 @@ internal; alias $STORAGE_ROOT/owncloud; } - location ~ ^/cloud/remote.php/(caldav|webdav|carddav)(.*)$ { - # Don't log requests that uses DAV (results in heavy spam) - access_log off; - } location ~ ^/((caldav|carddav|webdav).*)$ { # Z-Push doesn't like getting a redirect, and a plain rewrite didn't work either. # Properly proxying like this seems to work fine.