I'm deploying a PHP application to Beanstalk and all appears to be fine, however my .ebextensions
configuration files don't seem to be running.
I have just a single configuration file that is supposed to create a file, and then reload nginx.
/my-project/.ebextensions/nginx.config
:
files:
"/etc/nginx/conf.d/elasticbeanstalk/extend-nginx.conf" :
mode: "000755"
owner: root
group: root
content: |
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
location / {
try_files $uri $uri/ /index.php?$query_string;
}
container_commands:
reload_nginx:
command: "sudo service nginx reload"
My architecture is currently:
1. CodePipeline hooked up to GitHub that deploys the app to CodeDeploy everytime master is updated.
2. CodeDeploy receives the deployment from CodePipeline.
3. CodeDeploy installs it to the Elastic Beanstalk instance.
All the above steps work fine. I just don't understand why the config file in .ebextensions
is not creating the file as expected.
Note: I have confirmed that the .ebextensions
folder is in the root of the revision .zip by manually downloading one of the revisions and checking.