What session driver, because file session on load balancing can cause issues.. Just a thought, probably not the issue.
And here is something else: https://stackoverflow.com/questions/54139376/load-balancer-with-laravel-forge-got-404-css
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I've got a headscratcher.
My app is deployed using Forge/Envoyer on Digital Ocean. It's two application instances behind a load balancer, all set up by Forge.
The Laravel 7.3 version works fine with this setup and has been running beautifully.
However, I ran the Laravel Shift for Laravel 8. Went through all of the pull request comments and tested the application locally (via MacOS Valet). It's all working fine.
But when I deploy the upgraded application to production using Envoyer, every single route returns a 404. The application works fine on the the staging instance which is not behind a load balancer. I didn't touch any server configuration.
Here's what I've checked: -Controller namespace prefixing is still in place -I removed some comments from the web routes file -I don't see any obvious capitalization issues with class names
Does this ring any bells for anyone? Is there something I'm missing about load balancers/proxies and Laravel 8 that I missed in the upgrade guide?
I'm going to set up a parallel environment to see if I can replicate the issue but if anyone has any other ideas, I'd appreciate it.
It turns out the issue was the APP_URL env variable. I had it set to the www version of my domain, which now redirects to the root domain without a subdomain. Worked fine with Laravel 7.3 but broke everything after upgrading to 8. I finally figured this out after changing ENV variables one by one on the staging instance until it broke.
Please or to participate in this conversation.