diff --git a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 index 8fd5a5c..69107ef 100644 --- a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 +++ b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 @@ -1,5 +1,6 @@ server { listen {{ http_port }}; + client_max_body_size {{ nginx_client_max_body_size | default('100M') }}; {% if egi_image is defined and egi_image %} # No servername into the EGI images {% else %} @@ -13,8 +14,6 @@ server { error_log /var/log/nginx/{{ item.servername }}_error.log; root /usr/share/nginx/html/; - client_max_body_size 100M; - {% if haproxy_ips is defined %} # We are behind haproxy {% for ip in haproxy_ips %} @@ -96,6 +95,7 @@ server { {% if letsencrypt_acme_install %} server { listen {{ https_port }} ssl; + client_max_body_size {{ nginx_client_max_body_size | default('100M') }}; {% if egi_image is defined and egi_image %} # No servername into the EGI images {% else %} @@ -108,8 +108,6 @@ server { # This is the default for nginx on Ubuntu 14.04 root /usr/share/nginx/html/; - client_max_body_size 100M; - {% if haproxy_ips is defined %} # We are behind haproxy {% for ip in haproxy_ips %}