put ownCloud logs in separate log files

This commit is contained in:
jkaberg 2014-09-10 22:14:20 +02:00
parent 487e0d64e2
commit f375aab733
2 changed files with 8 additions and 2 deletions

View File

@ -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;
}

View File

@ -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.