diff --git a/conf/nginx.conf b/conf/nginx.conf index 86ed48b6..eb05b634 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -61,13 +61,10 @@ server { location ~ ^(/cloud)(/.+\.php)(/.*)?$ { # note: ~ has precendence over a regular location block include fastcgi_params; - fastcgi_param PHP_VALUE "upload_max_filesize = 16G"; - fastcgi_param PHP_VALUE "post_max_size = 16G"; - fastcgi_param PHP_VALUE "output_buffering = 16384"; - fastcgi_param PHP_VALUE "memory_limit = 512M"; fastcgi_param SCRIPT_FILENAME /usr/local/lib/owncloud/$2; fastcgi_param SCRIPT_NAME $1$2; fastcgi_param PATH_INFO $3; + fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on; fastcgi_pass php-fpm; error_page 403 /cloud/core/templates/403.php; error_page 404 /cloud/core/templates/404.php; diff --git a/setup/owncloud.sh b/setup/owncloud.sh index de196f0f..5429de49 100755 --- a/setup/owncloud.sh +++ b/setup/owncloud.sh @@ -7,14 +7,14 @@ source /etc/mailinabox.conf # load global vars apt_install \ dbconfig-common \ php5-cli php5-sqlite php5-gd php5-imap php5-curl php-pear php-apc curl libapr1 libtool libcurl4-openssl-dev php-xml-parser \ - php5 php5-dev php5-gd php5-fpm memcached php5-memcache unzip sqlite + php5 php5-dev php5-gd php5-fpm memcached php5-memcache unzip apt-get purge -qq -y owncloud* # Install ownCloud from source if it is not already present # TODO: Check version? if [ ! -d /usr/local/lib/owncloud ]; then - echo Installing ownCloud... + echo installing ownCloud... rm -f /tmp/owncloud.zip wget -qO /tmp/owncloud.zip https://download.owncloud.org/community/owncloud-7.0.1.zip unzip -q /tmp/owncloud.zip -d /usr/local/lib @@ -72,6 +72,13 @@ EOF mkdir -p $STORAGE_ROOT/owncloud chown -R www-data.www-data $STORAGE_ROOT/owncloud /usr/local/lib/owncloud +# Set PHP FPM values to support large file uploads +tools/editconf.py /etc/php5/fpm/php.ini \ + upload_max_filesize=16G \ + post_max_size=16G \ + output_buffering=16384 \ + memory_limit=512M + # Download and install the mail app # TODO: enable mail app in ownCloud config, not exposed afaik? if [ ! -d /usr/local/lib/owncloud/apps/mail ]; then @@ -95,5 +102,9 @@ chmod -R 777 /usr/local/lib/owncloud/apps/mail/vendor/ezyang/htmlpurifier/librar hide_output php /usr/local/lib/owncloud/console.php app:enable user_external hide_output php /usr/local/lib/owncloud/console.php app:enable mail +# Enable apps. +hide_output php /usr/local/lib/owncloud/console.php app:enable user_external +hide_output php /usr/local/lib/owncloud/console.php app:enable mail + php5enmod imap restart_service php5-fpm diff --git a/setup/zpush.sh b/setup/zpush.sh index 8acd4690..74962290 100755 --- a/setup/zpush.sh +++ b/setup/zpush.sh @@ -14,7 +14,7 @@ source /etc/mailinabox.conf # load global vars # Prereqs. apt_install \ - php-soap php5-imap libawl-php + php-soap php5-imap libawl-php php5-xsl php5enmod imap @@ -29,7 +29,7 @@ fi if [ $needs_update == 1 ]; then rm -rf /usr/local/lib/z-push rm -f /tmp/zpush.zip - echo Installing z-push \(fmbiete fork\)... + echo installing z-push \(fmbiete fork\)... wget -qO /tmp/zpush.zip https://github.com/fmbiete/Z-Push-contrib/archive/master.zip unzip -q /tmp/zpush.zip -d /usr/local/lib/ mv /usr/local/lib/Z-Push-contrib-master /usr/local/lib/z-push diff --git a/tools/update_mail_app.sh b/tools/update_mail_app.sh new file mode 100644 index 00000000..32fd564f --- /dev/null +++ b/tools/update_mail_app.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Simple script to update the mail app in ownCloud, not needed once it reaches beta+ + +echo "installing mail app..." +rm -f /tmp/owncloud_mail.zip +wget -qO /tmp/owncloud_mail.zip https://github.com/owncloud/mail/archive/master.zip +unzip /tmp/owncloud_mail.zip -d /usr/local/lib/owncloud/apps +mv /usr/local/lib/owncloud/apps/mail-master /usr/local/lib/owncloud/apps/mail +rm -f /tmp/owncloud.zip + +echo "installing php composer and mail app dependencies..." +curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/lib/owncloud/apps/mail +php /usr/local/lib/owncloud/apps/mail/composer.phar install --working-dir=/usr/local/lib/owncloud/apps/mail +chmod -R 777 /usr/local/lib/owncloud/apps/mail/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer + +echo "DONE! :-)" \ No newline at end of file