I have a problem where nginx seems to ignore (or override) my increased client_max_body_size directive in a Ubuntu Docker container on AWS Elastic Beanstalk. This prevents users from downloading files larger than nginx by default 1 MB.
I used client_max_body_size 10M; in the http, server and location blocks is useless, I still see the "client designed to send too large body errors" in nginx logs. I have successfully used these settings in an AW2 EC2 Ubuntu instance, but since I use the same setting in the Docker container, I am having this problem. I also tried using ebextension as described here Increasing client_max_body_size in Nginx conf on AWS Elastic Beanstalk
The application itself is CFML (Railo) running in a Tomcat container.
Here are the relevant nginx files:
Full unabridged files here https://github.com/chapmandu/docker-railo
Thanks in advance.
nginx error.log
2014/12/02 03:02:05 [error] 32116#0: *142 client intended to send too large body: 1290803 bytes, client: 172.31.19.39, server: , request: "POST /listings/35602/images/create HTTP/1.1", host: "staging.svr.com.au", referrer: "http://staging.svr.com.au/listings/35602/images/new"
nginx.conf
daemon off; worker_processes 1; events { worker_connections 1024; } http { client_max_body_size 10M; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; include /etc/nginx/sites-enabled/default; }
default
server { listen 80; server_name localhost; client_max_body_size 10M;
proxy_params
proxy_redirect off;
source share