Have tried to configure your APP_URL inside the .env?
Or you can delete the cached packages/services manually by deleting
bootstrap/cache php file
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello everyone, I know this question may seem similar to many others but it isn't, and I've spent nearly one entire day googling and trying out everything I could find, but I cannot solve these 404 errors.
I have a website currently running on a shared hosting and working perfectly, I need to move it to a more powerful server so I opted for the Forge+DigitalOcean combo as a sure bet to quickly have it up and running but it's been two days and I just can't figure out why no resources from the public folder is being loaded (app.css, images, js files...).
I keep my files directly into the mywebsite.com/public folder (not storage/app/public) so it shouldn't be a symlink problem.
The website routes work, I can visit any page but they just load external resources and html, and get 404 error for everything from the public folder.
I've tried setting up a symlink anyway and it works but no files are found anyway. As a test I've tried putting the files in the storage/app/public folder and set up the symlink with "php artisan storage:link" but nothing, I've set permissions of the public folder to 777 recursively to all files, also countless cache clear, routes clear and so on. If I inspect the generated urls they are correct, the files are there, but if I visit them I get a 404 error.
This app is currently working perfectly fine locally as well as on a shared hosting so there are no mistakes in my routes, urls, or anything related to wrong links or misplaced files, I'm quite sure it has to be something specific to this server configuration, but I really can't think of anything else anymore.
Found a solution, for those having the same issue the problem was solved from the "Meta" panel in forge, where you can set a "Web Directory" folder. That folder was set to "/public" but my app was already set so that all links where explicitly linking to the public folder, and so with that setting all resources where basically linking to mywebsite.com/public/public/resource. Deleting the content of that field solved the problem.
Please or to participate in this conversation.