Commit 94c81832 authored by Daniel's avatar Daniel

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

Update overlay/root/update_git.sh, overlay/root/scripts/nc_tuning.sh, overlay/root/scripts/nc_config.sh, overlay/root/scripts/_PATHS_.sh, overlay/usr/local/etc/nginx/nginx-nextcloud-ssl.conf, overlay/usr/local/etc/nginx/nginx.conf files
parent 2e8ba501
......@@ -43,3 +43,4 @@ file_nginx_nc_conf_ssl="${dir_nginx}/nginx-nextcloud-ssl.conf"
# php
dir_php_confs=/usr/local/etc/php
file_php_conf=/usr/local/etc/php.ini
dir_php_tmp=/tmp/php
......@@ -58,6 +58,9 @@ occ config:system:set trusted_domains 1 --value "${serverip}"
occ config:system:set overwrite.cli.url --value "https://${servername}"
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
echo; echo "nextcloud: setup nextcloud logging"
#https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html
......@@ -67,7 +70,7 @@ chown "${WWW_USER}:${WWW_GROUP}" ${file_nc_log}
chmod 640 ${file_nc_log}
# register logging in nextcloud
occ config:system:set log_type --value "file"
occ config:system:set logfile. --value "${file_nc_log}"
occ config:system:set logfile --value "${file_nc_log}"
occ config:system:set logfilemode --value "0640"
occ config:system:set loglevel --value 0
occ config:system:set logdateformat --value '"F d, Y H:i:s"'
......
......@@ -42,16 +42,15 @@ conf_update -c $file_php_fpm_d_www -o "pm.max_spare_servers" -v 18
echo "tuning: big files"
###
# configure upload of big files
# https://docs.nextcloud.com/server/15/admin_manual/configuration_files/big_file_upload_configuration.html#nginx
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#nginx
###
mkdir -p $dir_php_tmp
chown $WWW_USER $dir_php_tmp
# change php.ini
conf_update -c ${file_php_conf} -o "upload_tmp_dir" -v "${dir_php_tmp}"
conf_update -c ${file_php_conf} -o "output_buffering" -v "0"
conf_update -c ${file_php_conf} -o "memory_limit" -v "8G"
conf_update -c ${file_php_conf} -o "post_max_size" -v "8G"
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"
conf_update -c ${file_php_conf} -o "output_buffering" -v "0"
conf_update -c ${file_php_conf} -o "upload_tmp_dir" -v "/var/big_temp_file/"
mkdir -p /var/big_temp_file
chown $WWW_USER /var/big_temp_file
# disable chunking of file
occ config:app:set files max_chunk_size --value 0
......@@ -24,4 +24,4 @@ else
fi
rsync -a "${dir_git_nc}/overlay/root/" /root/
find /root/ -type f -iname "*.sh" -print0 | xargs -0 chmod +x
find /root/ -type f -iname "*.sh" -print0 | xargs -0 chmod +x
......@@ -45,7 +45,6 @@ server {
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
# set max upload size
client_max_body_size 512M;
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers
......@@ -146,6 +145,7 @@ server {
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_read_timeout
}
location ~ \.(?:css|js|svg|gif)$ {
......
......@@ -23,10 +23,11 @@ http {
# Common limits
# ----------
client_max_body_size 100m; # upload size
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;
......
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