aws-samples / eb-php-drupal

Configuration files and instructions for installing Drupal securely and running it in a load balanced AWS Elastic Beanstalk environment with an EFS file system for shared assets.
Apache License 2.0
45 stars 24 forks source link

Configure nginx for drupal on Linux 2 platforms #7

Open GregoireWulliamoz opened 4 years ago

GregoireWulliamoz commented 4 years ago

Issue #6 :

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ghost commented 4 years ago

Hope this into the official docs

ghost commented 3 years ago

@GregoireWulliamoz , this config does not work its showing this error while trying to deploy [ERROR] An error occurred during execution of command [app-deploy] - [start proxy with new configuration]. Stop running the command. Error: copy proxy conf from staging failed with error validate nginx configuration failed with error Command /bin/sh -c /usr/sbin/nginx -t -c /var/proxy/staging/nginx/nginx.conf failed with error exit status 1. Stderr:nginx: [emerg] "location" directive is not allowed here in /var/proxy/staging/nginx/conf.d/drupal.conf:1 nginx: configuration file /var/proxy/staging/nginx/nginx.conf test failed

ghost commented 3 years ago

Sorry it works now, only when i placed the config file in .platform/nginx/conf.d/ebextensions/drupal.conf . Any idea why it doesnt work when i place it in .platform/nginx/conf.d/drupal.conf. The later is what suggested in the docs extending linux platforms