Problem Loading Assets using Herd with Expose
I am trying to use Laravel Herd with Expose to share my filament site. The site loads, but for some reason the assets are trying to load over port 8080 instead of 80. Can anyone point me in the right direction of how to solve this? The site loads fine locally, I updated the APP_URL in the .env to the Expose url, but still same behaviour
Solution:Jump to solution
I finally figured out my problem. The ASSET_URL fixed it, however it did not work before because I have another copy of the project in a different one of my Herd paths. it was picking up that project instead of the one i was editing. Thanks everyone for the help.
5 Replies
Tends to work here, run npm run build again
Force ASSET_URL in .env
https://laravel.com/docs/11.x/vite#custom-base-urls
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
I set the ASSET_URL, did not work. I also tried changing the environment from local to production and npm build, view:clear. nothing seems to work.
it always tries to load individual css and js files over port 8080
Try ngrok
Solution
I finally figured out my problem. The ASSET_URL fixed it, however it did not work before because I have another copy of the project in a different one of my Herd paths. it was picking up that project instead of the one i was editing. Thanks everyone for the help.