From f375aab733bf84253878bfd30cad0488e0bb2301 Mon Sep 17 00:00:00 2001 From: jkaberg Date: Wed, 10 Sep 2014 22:14:20 +0200 Subject: [PATCH] put ownCloud logs in separate log files --- conf/nginx-primaryonly.conf | 5 +++++ setup/owncloud.sh | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conf/nginx-primaryonly.conf b/conf/nginx-primaryonly.conf index f39db20c..47d1bd9f 100644 --- a/conf/nginx-primaryonly.conf +++ b/conf/nginx-primaryonly.conf @@ -11,7 +11,12 @@ 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; } diff --git a/setup/owncloud.sh b/setup/owncloud.sh index 65903220..6db86192 100755 --- a/setup/owncloud.sh +++ b/setup/owncloud.sh @@ -90,9 +90,10 @@ EOF ?> EOF - # Create user data directory and set permissions + # Create user data directory, log directory and set permissions mkdir -p $STORAGE_ROOT/owncloud - chown -R www-data.www-data $STORAGE_ROOT/owncloud /usr/local/lib/owncloud + mkdir -p /var/log/owncloud + chown -R www-data.www-data $STORAGE_ROOT/owncloud /usr/local/lib/owncloud /var/log/owncloud # Execute ownCloud's setup step, which creates the ownCloud sqlite database. # It also wipes it if it exists. And it deletes the autoconfig.php file.