Unverified Commit 0a70faff authored by Marc Crebassa's avatar Marc Crebassa Committed by GitHub
Browse files

Merge pull request #68 from aalaesar/feature/add_max_upload

Feature: add maximum upload size parameter
parents 97ae6db7 38451731
......@@ -66,6 +66,8 @@ nextcloud_db_admin: "ncadmin"
# nextcloud_db_pwd: "secret"
# [TLS] parameters used in the apache2 & nginx templates
## max file's size allowed to be uploaded on the server
nextcloud_max_upload_size: 512m # in Byte or human readable size notation (g|m|k)
nextcloud_install_tls: true
nextcloud_tls_enforce: true
nextcloud_mozilla_modern_ssl_profile: false # when false, intermediate profile is used
......
......@@ -17,6 +17,9 @@
ServerAlias {{ nextcloud_trusted_domain[index]}}
{% endfor %}
DocumentRoot {{ nextcloud_webroot }}
{% if (nextcloud_max_upload_size_in_bytes|int) <= 2147483647-%}
LimitRequestBody {{ nextcloud_max_upload_size_in_bytes }}
{% endif -%}
<Directory {{ nextcloud_webroot }}>
Allow from all
Satisfy Any
......@@ -41,7 +44,9 @@
ServerAlias {{ nextcloud_trusted_domain[index]}}
{% endfor %}
DocumentRoot {{ nextcloud_webroot }}
{% if (nextcloud_max_upload_size_in_bytes|int) <= 2147483647-%}
LimitRequestBody {{ nextcloud_max_upload_size_in_bytes }}
{% endif -%}
SSLEngine on
SSLCertificateFile {{ nextcloud_tls_cert_file }}
SSLCertificateKeyFile {{ nextcloud_tls_cert_key_file }}
......
......@@ -90,7 +90,7 @@ server {
}
# set max upload size
client_max_body_size 512M;
client_max_body_size {{ nextcloud_max_upload_size }};
fastcgi_buffers 64 4K;
{% if (nextcloud_computed_major_version|int) > 13 %}
......
......@@ -8,6 +8,8 @@ nextcloud_dl_file_name:
mysql_credential_file:
debian: '/etc/mysql/debian.cnf'
nextcloud_max_upload_size_in_bytes: "{{ nextcloud_max_upload_size | human_to_bytes }}"
## finding the major version selected by the user :
## type : string
# the user will set either nextcloud_version_major or nextcloud_version_full
......
Supports Markdown
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