Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
AWS python Flask EB .ebextensions .conf file is not working

.conf file

files:
  "/etc/nginx/conf.d/01_proxy.conf":
    mode: "000644"
    owner: root
    group: root
    content: |
      client_max_body_size 200M;

container_commands:                         
  01_reload_nginx:                           
    command: "sudo nginx -s reload"

I have put this file in all possible folders:

.ebextensions
|-- 01_nginx.conf
|
|--nginx
   |--01_nginx.conf
   |--conf.d
      |--01_nginx.conf

when I check the log, the first message is

2020/07/31 18:23:59.603405 [INFO] Finished executing the config set Infra-EmbeddedPostBuild.

then

2020/07/31 18:23:59.603427 [INFO] Executing instruction: CleanEbExtensions

In theory when .ebextensions is cleant the custom commands should already have been executed, but they are not (when I connect via ssh to the server no file has been created as well as if I try to upload files, the server responds with a 413).

I have also tried modifying the nginx.conf file in /etc/nginx/ but it is reset everytime I update the code. All the /etc/nginx/ directory seems to be reset because I have also tried to put a "000_custom.conf" file in "/etc/nginx/conf.d/", but with no results.

Edit: I'd like to point out that if I modify nginx.conf in "/etc/nginx/" on the server and I do a "sudo nginx -s reload" it works till the next code build.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The likely reason why your nginx config does not work is that you are using current version of EB which is based on Amazon Linux 2 (AL2). However, your nginx config files are for AL1, which is old.

For AL2, nginx settings should be in .platform, not in .ebextentions as shown in the docs.

Therefore, you could try creating file .platform/nginx/conf.d/mynginx.conf with the content of:

client_max_body_size 200M;
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!