I\'ve just deploy a new laravel 7 application on AWS Elastic beanstalk. I\'ve noticed they changed the Apache server to Nginx server.
https://docs.aws
If you are using Amazon linux 2 with elastic beanstalk with an nginx server then you need to follow the guidance here https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html
Simply though all you need to do is create a folder structure mapping the nginx config location you want to place you config file with .platform as the topmost folder this should be in your application root
i.e. in a laravel app create a folder called .platform in the same level as the app folder within this .platform folder create the following /nginx/conf.d/elasticbeanstalk so you have a folder structure like .platform/nginx/conf.d/elasticbeanstalk in this last folder elasticbeanstalk place your config file
e.g. laravel.conf
location / {
try_files $uri $uri/ /index.php?$query_string;
gzip_static on;
}
once you upload the application to eb it will copy the file to the same location on the server and restart nginx Hope that makes sense