9 months ago, and not yet solutions. same with me right now. i need that structure. anyone?
Laravel 5 and multisites in shared hosting
Hi everybody,
I'm new in laravel and my intention is to replace our ad hoc CMS with a lavarel based one. But i like (and must for memory and maintenance reasons) tu use one laravel installation for many sites in a shared hosting.
I've read some related responses and the most part suggests to put every site public_html under the public dir of laravel: A)
docRoot
....app
....bootstrap
....config
....database
....public
........laravelSite1
............public_html
............etc
........laravelSite2
............public_html
............etc
....resources
....storage
....tests
....vendor (near 21.2 MB = 98.6% of laravelSite1)
.....env
....artisan
....etc
It seems not an efficient solution for our needs.
I do like that app,bootstrap,...(all except the vendor) dirs to be site specific and only the vendor dir to be common for all sites. And next to vendor dir i must put other common (existing) libraries for ecommerce, newsletter, etc like we now do. Whorse is (to my needs at least) the use of separated laravel installation per site, which seems to be the default laravel architecture solution:
B)
docRoot
....laravelSite1 (start dim near 21.5 MB)
........app
........bootstrap
........config
........database
........public
........resources
........storage
........tests
........vendor (near 21.2 MB = 98.6% of laravelSite1)
.........env
........artisan
........etc
....laravelSite2 (start dim near 21.5 MB)
........app
........bootstrap
........config
........database
........public
........resources
........storage
........tests
........vendor (near 21.2 MB = 98.6% of laravelSite2)
.........env
........artisan
........etc
....laravelSite3 (start dim near 21.5 MB)
........etc
So for 10 sites to say, at the start level we are in need of 10* 21.5 = 215 MB with repeated equal vendor.
The best solution for me (and everybody i think) is to use this directory strutcture:
C)
docRoot
....vendor (near 21.2 MB valid for all sites below)
....laravelSite1 (start dim near 0.3 MB)
........app
........bootstrap
........config
........database
........public
........resources
........storage
........tests
.........env
........artisan
........etc
....laravelSite2 (start dim near 0.3 MB)
........app
........bootstrap
........config
........database
........public
........resources
........storage
........tests
.........env
........artisan
........etc
....laravelSite3 (start dim near 0.3 MB)
........
so for 10 sites at the start status we are in need of 21.2 + 10*0.3 = 24.2 MB
Where all the sites use the same vendor library - very nice, isn't it ?
I attemped to realise the last structure but there are meny relativ paths problems in the libraries under vendor. And obviously the actual artisan commands doesn't work.
I ask:
is there any reason that Laravel (5 at least) does not have the (C) equivalent structure like this:
laravelApplicationRootDir
....vendor
....laravelSite
........app
........bootstrap
........config
........database
........public
........resources
........storage
........tests
.........env
........artisan
........etc
Any help please ?
My kind regards
Please or to participate in this conversation.