DEV Community

Cover image for Extend nginx/Apache Proxy Configurations on AWS ElasticBeanstalk

Extend nginx/Apache Proxy Configurations on AWS ElasticBeanstalk

David Ojeda on January 26, 2018

AWS ElasticBeanstalk applications use either an nginx or Apache proxy to relay requests. Using the .ebextensions feature of ElasticBeanstalk we can...
Collapse
 
harjotscs profile image
Harjot Singh

I thoroughly followed every line of your post but elastic beanstalk is not creating file please help it’s important

Collapse
 
david_ojeda profile image
David Ojeda

Hey there!! Are you using Apache or Nginx?

Collapse
 
harjotscs profile image
Harjot Singh

I am using nginx and my web app platform is node js

Thread Thread
 
david_ojeda profile image
David Ojeda

Are you using .ebextensions already or is this the first file you are creating like this?

Where are you creating the .ebextensions directory?

Make sure your dir structure looks like this:
dir structure

Thread Thread
 
harjotscs profile image
Harjot Singh

I am creating .ebextensions folder for the first time my directory structure is absolutely similar to this except i didn't added elasticbeanstalk directory except everything is same
A picture of my structure is attatched
dev-to-uploads.s3.amazonaws.com/i/...

Thread Thread
 
david_ojeda profile image
David Ojeda

I'm not sure what's going on, everything looks good.

You can try these steps instead: docs.aws.amazon.com/elasticbeansta...

Collapse
 
martin49007715 profile image
Martin

forbiden upload file .ebextensions/01-symfony.config

files:
"/etc/nginx/conf.d/elasticbeanstalk/z-symfony.conf":
mode: "000644"
owner: root
group: root
content: |
location / {
try_files $uri /index.php$is_args$args;
}

Collapse
 
martin49007715 profile image
Martin

Hello, when I deploy in ssh I see that the file is generated, but when the deployment finishes it automatically deletes it. Do you know what it can be? Thank you all