From cb198fb52ff3f4eadf2bc01dbb0722f67be12b34 Mon Sep 17 00:00:00 2001 From: Alexandre BRACH Date: Thu, 6 Jun 2019 14:11:54 +0200 Subject: [PATCH] fix max upload --- docker/nginx/boot.sh | 2 -- docker/nginx/nginx.conf.sample | 6 +++--- docker/phraseanet/php.ini.sample | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docker/nginx/boot.sh b/docker/nginx/boot.sh index 4d702b6a6b..49e6b8a3b7 100755 --- a/docker/nginx/boot.sh +++ b/docker/nginx/boot.sh @@ -1,6 +1,4 @@ #!/bin/bash -cat /nginx.conf.sample cat nginx.conf.sample | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" > /etc/nginx/nginx.conf -cat /etc/nginx/nginx.conf nginx -g "daemon off;" diff --git a/docker/nginx/nginx.conf.sample b/docker/nginx/nginx.conf.sample index 1e75ba8a8f..c1f0150c1e 100644 --- a/docker/nginx/nginx.conf.sample +++ b/docker/nginx/nginx.conf.sample @@ -1,8 +1,8 @@ user app; worker_processes auto; -error_log /var/log/ngnix_error.log info; -#error_log /dev/stdout info; +#error_log /var/log/ngnix_error.log info; +error_log /dev/stdout info; pid /var/run/nginx.pid; #daemon off; @@ -52,6 +52,7 @@ http { root /var/alchemy/Phraseanet/www; index index.php; + client_max_body_size $MAX_BODY_SIZE; location /api { rewrite ^(.*)$ /api.php/$1 last; @@ -60,7 +61,6 @@ http { location / { # First attempt to serve request as file, then # as directory, then fall back to index.html - client_max_body_size $MAX_BODY_SIZE; try_files $uri $uri/ @rewriteapp; } diff --git a/docker/phraseanet/php.ini.sample b/docker/phraseanet/php.ini.sample index 13651fc1e3..774389b614 100644 --- a/docker/phraseanet/php.ini.sample +++ b/docker/phraseanet/php.ini.sample @@ -397,7 +397,7 @@ max_input_time = 60 ;max_input_nesting_level = 64 ; How many GET/POST/COOKIE input variables may be accepted -;max_input_vars = 1000 +max_input_vars = $MAX_INPUT_VARS ; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit