I've been running Waterhole locally and the installation was indeed a smooth and rewarding experience! However, I just use php artisan serve
to run the local instance as I'm pretty much dreading server setups.
So I tried to go with Laravel Forge to set up a live instance but it seems I'm still missing the right configuration. The app is running and the site is being served, but the storage
-link in the public folder is not generated and no styles or scripts are applied.
The public/storage
folder on the server:
The nginx server config is just the defaults on Forge, plus the recommendations.
7 Comments
https://waterhole.dev/community/posts/40-css-and-js-not-rendering
try this.
The directory permissions should be set to "www" as the owner, rather than root.
Thanks for the suggestion @Subarist! I saw your previous post, but this relates to a setup with Apache, no?
Sorry for my limited English expression. I am not very familiar with Apache or Nginx, and I just threw your question at ChatGPT.
Then it told me that, first, you need to check the folder permissions:
I was able to solve the issue by creating another .htaccess in the root folder to get the public folder
.htaccess must contain this
If it work drop a like
@Subarist Yeah, I don't think that's the right direction. It would also be weird if I'd need to access the server console to correct folder permissions when I use Forge to set them up correctly in the first place.
Thank you @Adeala Ademola! I guess that's also related to using Apache though.
The site is served from the public folder, so the folder is accessible and all. The issue I see is that the symlink
storage -> /storage/app/public
is not generated in the public folder. And when I add it manually, it's not used.Ok, up now! Had to do two additional steps:
ln -s /home/forge/<your-sitename>/storage/app/public/ storage
In any case, thanks for the suggestions :)
Not sure how this restriction to https works. But just getting started with Laravel..