I tried multiple solutions
client_max_body_size 100M;
to my root application .ebextensions/nginx/conf.d/proxy.conf
but when deploying this to live it give me error
1/18/2023 11:59:22 AM Service:AmazonCloudFormation, Message:[/Resources/AWSEBAutoScalingGroup/Metadata/AWS::CloudFormation::Init/prebuild_0_RisksessAML/files//etc/nginx/conf.d/proxy.conf] 'null' values are not allowed in templates
2.Then i tried the other way by accessing nginx.conf with SSH through putty I updated my conf file and saved it. it works fine but when ever I redeploy my code it replaces the sudo nano /etc/nginx/nginx.conf
file with a new one which do not have the client_max_body_size 100M;
code.
You should be using .platform/nginx/conf.d/
, not .ebextentions
to setup client_max_body_size
as explained in the AWS docs .
For example create .platform/nginx/conf.d/myconfig.conf
with the content of:
client_max_body_size 100M;
what worked for me was you should be using .platform/nginx/conf.d/elasticbeanstalk/myconfig.conf
instead of just .platform/nginx/conf.d/myconfig.conf
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.