How to fix Elastic Load Balancer 408 Errors in Elastic Beanstalk

Recently, when viewing Apache logs for an application deployed in Elastic Beanstalk (EB) behind an Elastic Load Balancer (ELB), I noticed a frequently recurring 408 error being triggered by an internal connection. The 408 error was caused because of a connection draining setting being enabled which in turn caused EB to think that requests were […]

How to Fix Laravel HTTPS Redirect Loop on Amazon Elastic Beanstalk/Load Balancer/Proxy

If you are forcing HTTPS on routes in Laravel but are having issues with a redirect loop and your app is behind a proxy, load balancer, or something like Elastic Beanstalk, try adding this to your .htaccess file: #Fixes HTTPS Redirect Loop SetEnvIfNoCase X-FORWARDED-PROTO “^https$” HTTPS Many load balancers will accept HTTPS traffic and forward […]

How to Get Laravel Task Scheduling Working on AWS Elastic Beanstalk Cron

We use AWS Elastic Beanstalk for quite a few projects and its’ rapid deployment models make it indispensable. Laravel 5 (5.1) includes a powerful Task Scheduling model that can be used to automate any part of your Laravel application using just one cron that runs an artisan command. If you’re setting environment variables directly through […]