.ebextensions config file instructions ignored

0

I want to upload files from my website, but nginx by default has a pretty low limit for request size, so I want to update the configuration file using an ebextension. I created a .ebextensions/nginx.config file at the root of my project with this inside:

files:
  /etc/nginx/conf.d/elasticbeanstalk/client_max_body_size.conf:
    mode: "000644"
    owner: root
    group: root
    content: |
      client_max_body_size 20M;

Then I ran eb deploy

$ eb deploy BMFT-DEV
Creating application version archive "app-fc4ae-240415_185719968838".
Uploading: [##################################################] 100% Done...
2024-04-15 16:57:27    INFO    Environment update is starting.      
2024-04-15 16:57:32    INFO    Deploying new version to instance(s).
2024-04-15 16:58:40    INFO    Instance deployment completed successfully.
2024-04-15 16:58:46    INFO    New application version was deployed to running EC2 instances.
2024-04-15 16:58:46    INFO    Environment update completed successfully.

But when I checked if the file was created on the EC2 instance, it wasn't.

# ls /etc/nginx/conf.d/elasticbeanstalk/ -all
total 8
drwxr-xr-x 2 root root  53 Apr 15 16:58 .
drwxr-xr-x 3 root root  60 Apr 15 16:58 ..
-rw-r--r-- 1 root root 397 Apr 15 16:58 00_application.conf
-rw-r--r-- 1 root root 215 Apr 15 16:58 healthd.conf

I checked the eb-engine.log file and found nothing related to my extension. It's like it was completely ignored. I don't understand what I did wrong here.

Thanks in advance.

  • Also:

    • I double-checked the application archive, the .ebextensions/nginx.config file is indeed there.
    • If I manually add the file myself on the instance and restart nginx, the new limit is taken into account and file uploading works just fine.

    I just don't understand why my nginx.config file is being ignored by EBS.

Mickael
asked 14 days ago129 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions