spring boot – Increasing client_max_body_size for Nginx on AWS ElasticBeanstalk (Amazon Linux 2023)
You need to configure a valid block, you cannot specify the client_max_body_size directive without placing it inside an appropriate block like http, server, or location. NGINX configuration files are structured in hierarchical blocks, and directives must be placed inside those blocks to be valid.
Something like this :
http {
server {
listen 80;
server_name example.com;
client_max_body_size 2000M;
location / {
root /var/www/html;
}
}
}
Or you can replace the principal config with your custom changes .platform/nginx/nginx.conf and you need to pull beanstalk configuration by adding :
include conf.d/elasticbeanstalk/*.conf;
Read more here: Source link
