Commit 83eb77ca authored by Daniel's avatar Daniel

Update overlay/root/scripts/nc_config.sh, overlay/root/scripts/nc_tuning.sh,...

Update overlay/root/scripts/nc_config.sh, overlay/root/scripts/nc_tuning.sh, overlay/usr/local/etc/nginx/nginx.conf, overlay/usr/local/etc/nginx/nginx-nextcloud-ssl.conf, overlay/root/scripts/functions.sh, overlay/root/scripts/redis_config.sh files
parent 94c81832
......@@ -148,6 +148,7 @@ conf_update(){
if [ $# -eq 1 ]; then file_conf="$1"; break; fi
if [ $# -eq 2 ]; then file_conf="$1"; option="$2"; debug=true; break; fi
if [ $# -eq 3 ]; then file_conf="$1"; option="$2"; new_val="$3"; break; fi
echo "ERROR: invalid parameter settings starting with '$1'"; return 1;
;;
esac
shift 2
......
......@@ -60,7 +60,8 @@ occ config:system:set mysql.utf8mb4 --value "true"
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#adjust-chunk-size-on-nextcloud-side
# default 10485760 (10 MB)
occ config:app:set files max_chunk_size --value 536870912
# 1gb 1.073.741.824
occ config:app:set files max_chunk_size --value 1073741824
echo; echo "nextcloud: setup nextcloud logging"
#https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html
......
......@@ -39,7 +39,7 @@ conf_update -c $file_php_fpm_d_www -o "pm.min_spare_servers" -v 6
conf_update -c $file_php_fpm_d_www -o "pm.max_spare_servers" -v 18
echo "tuning: big files"
echo "tuning: big files > 512"
###
# configure upload of big files
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#nginx
......@@ -54,3 +54,11 @@ conf_update -c ${file_php_conf} -o "post_max_size" -v "16G"
conf_update -c ${file_php_conf} -o "upload_max_filesize" -v "16G"
conf_update -c ${file_php_conf} -o "max_input_time" -v "3600"
conf_update -c ${file_php_conf} -o "max_execution_time" -v "3600"
# disable nextcloud chunking
occ config:app:set files max_chunk_size --value 1073741824
#edit nginx-nextcloud-ssl.conf
conf_update -e ";" -a " " ${file_nginx_nc_conf_ssl} client_max_body_size 16G
conf_update -e ";" -a " " ${file_nginx_nc_conf_ssl} client_body_temp_path ${dir_php_tmp}
conf_update -e ";" -a " " ${file_nginx_nc_conf_ssl} proxy_buffering off
conf_update -e ";" -a " " ${file_nginx_nc_conf_ssl} proxy_max_temp_file_size 16G
conf_update -e ";" -a " " ${file_nginx_nc_conf_ssl} fastcgi_read_timeout 360s
......@@ -36,6 +36,7 @@ conf_update -a ' ' ${file_redis_conf} unixsocketperm 770
echo "redis: register redis in nextcloud"
# set caching
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/files_locking_transactional.html
# for apcu caching
# occ config:system:set memcache.local --value '\OC\Memcache\APCu'
#
......
......@@ -45,6 +45,12 @@ server {
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
# set max upload size
# fix for big files
client_max_body_size 512m;
client_body_temp_path /tmp/php;
proxy_buffering off;
proxy_max_temp_file_size 16G;
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers
......@@ -145,7 +151,7 @@ server {
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_read_timeout
fastcgi_read_timeout 60s;
}
location ~ \.(?:css|js|svg|gif)$ {
......
......@@ -23,12 +23,9 @@ http {
# Common limits
# ----------
client_max_body_size 512M;
client_body_buffer_size 1m;
client_header_timeout 3m;
client_body_timeout 3m;
client_body_temp_path /tmp/php
include mime.types;
default_type application/octet-stream;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment