skip to Main Content

I tried multiple solutions

  1. I tried to add a .conf file with
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.

2

Answers


  1. Chosen as BEST ANSWER

    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


  2. 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;
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search