diff --git a/conf/nginx-primaryonly.conf b/conf/nginx-primaryonly.conf index 56307ee5..831b0320 100644 --- a/conf/nginx-primaryonly.conf +++ b/conf/nginx-primaryonly.conf @@ -14,12 +14,21 @@ rewrite ^(/cloud/core/doc/[^\/]+/)$ $1/index.html; location /cloud/ { 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; @@ -43,6 +52,9 @@ # Z-Push doesn't like getting a redirect, and a plain rewrite didn't work either. # Properly proxying like this seems to work fine. proxy_pass https://$HOSTNAME/cloud/remote.php/$1; + + # Don't log requests that uses DAV (results in heavy spam) + access_log off; } rewrite ^/.well-known/host-meta /cloud/public.php?service=host-meta last; rewrite ^/.well-known/host-meta.json /cloud/public.php?service=host-meta-json last; diff --git a/conf/nginx.conf b/conf/nginx.conf index b8751bd5..2ae62856 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -63,7 +63,8 @@ server { include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/local/lib/z-push/index.php; fastcgi_param PHP_VALUE "include_path=.:/usr/share/php:/usr/share/pear:/usr/share/awl/inc"; - fastcgi_read_timeout 630; + fastcgi_read_timeout 1750s; + fastcgi_send_timeout 1750s; fastcgi_pass php-fpm; # Outgoing mail also goes through this endpoint, so increase the maximum diff --git a/setup/owncloud.sh b/setup/owncloud.sh index 5753a7da..fc46e5c1 100755 --- a/setup/owncloud.sh +++ b/setup/owncloud.sh @@ -94,9 +94,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.