-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public disk - How to handle properly? #11
Comments
My current solution to keep Laravel's default notation for storing "public customer data": Make a similar link as ln -s ../../storage/<full_domain_name>/app/public <full.domain.name> (mind the change from _ to . in the current version) Modify
(( Also now I know that RewriteCond stores its regex-atoms into If you like that idea: Would it be possible that you automate the linking part, or have a command like |
Hi, thank you for appreciating the package :) You have a point because
What I would do to solve your issue probably would be the following:
Let me know if it helps, maybe it is worth considering to add it in the docs. Cheers Giacomo |
Hi Giacomo! I just finished the .htaccess solution by banging my head against mod_rewrite until it worked :-D My problem is, that I use Laravel only for the backend. The frontend is Vue.js so it is preferable that "customer data" remains, at least seemingly, in the Of course I could also just rewrite the Vue.js frontend to be domain-name aware, which has additional problems, as we have a huge repository mostly used for none-multi-domain applications. If you find any benefit in my solution you can also document it for SPA-developers. With kind regards, |
I don't think there will be any customization. Putting files into the public directory bypasses Laravel, which is a huge performance boost, as the HTTP daemon just serves the file without consulting Laravel. All other requests are relayed to the As the default .htaccess reads: When the URL doesn't lead to any directory (first line) or file (second line) ask laravel for help (third line).
|
Hi! I have had now a bit of time to review your comments.
Mmmh I don't know, but probably I will do a pull request when I have a bit of time. The only customization part would be the name of the link, in a way that we will not be forced to choose
Yes, I'm not very expert of If you don't have any other remarks, I close the issue, thank you very much Giacomo |
Hello!
Thank you for you great tool!
How would
php artisan storage:link --domain domain.of.this.site
work properly?
https://laravel.com/docs/master/filesystem#the-public-disk
Currently I would manipulate the
config/filesystem.php
to point every request into the default storage/app/public/domain.of.this.site directoryThat said, even cooler would be a file resolution trick to replace the public/storage directory with the correct one.
Which should be possible with .htaccess
What have you planned in that regard?
The text was updated successfully, but these errors were encountered: