From 6fc6b1e6a17946223604f8da7c8530ed9cb2f114 Mon Sep 17 00:00:00 2001 From: jkaberg Date: Wed, 10 Sep 2014 22:40:24 +0200 Subject: [PATCH] ownCloud uses separate log location, but ignores regexp access_log --- conf/nginx-primaryonly.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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.