.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
질문됨 한 달 전136회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠