From 347a8a7dfc5071136e734891c5dbe2bb08bd91e2 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 17 Feb 2020 13:09:43 +0100 Subject: [PATCH] nginx virtualhost: set client_max_body_size. --- templates/nginx_wordpress.conf.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/nginx_wordpress.conf.j2 b/templates/nginx_wordpress.conf.j2 index 30fe34e..1d4d6e8 100644 --- a/templates/nginx_wordpress.conf.j2 +++ b/templates/nginx_wordpress.conf.j2 @@ -88,6 +88,13 @@ server { real_ip_header X-Forwarded-For; {% endif %} + + {% if item.max_body is defined %} + client_max_body_size {{ item.max_body }}; + {% else %} + client_max_body_size {{ nginx_client_max_body_size }}; + {% endif %} + # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html;