1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-29 04:17:07 +00:00
This commit is contained in:
Joel Kåberg 2014-10-24 15:13:53 +00:00
commit b49cedb584
3 changed files with 17 additions and 3 deletions

View File

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

View File

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

View File

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