Browse Source

[nginx] set max_body_size as variable with default

python3
Edoardo Putti 7 years ago
parent
commit
9e2fe99c6e
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      roles/nginx/defaults/main.yml
  2. +1
    -1
      roles/nginx/templates/proxy.conf.nginx.j2

+ 2
- 0
roles/nginx/defaults/main.yml View File

@ -2,3 +2,5 @@
is_proxy: false is_proxy: false
php: false php: false
config_name: null config_name: null
# max body size in Mb
max_body_size: 8

+ 1
- 1
roles/nginx/templates/proxy.conf.nginx.j2 View File

@ -1,5 +1,5 @@
location / { location / {
client_max_body_size 50M;
client_max_body_size {{ max_body_size }}M;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host; proxy_set_header Host $http_host;


Loading…
Cancel
Save