Deploying Laravel to Elastic Beanstalk with Runtime 2 (PHP 7.4) If you recently tried to deploy a Laravel app to elastic beanstalk using nginx + PHP 7.4 then you must know that whenever you try to access any of your app routes it will throw an 404 error. Well, this happens because the latest elastic beanstalk runtime uses nginx as default web server in replacement of Apache, the one being use in the oldest versions. A lot of users just decide to ditch php 7.4 and go back to php 7.2 with the older runtime and problem solved.
And of course, you can add any other directives inside this file.