0

I would have some setup questions regarding Laravel 5.

I set up a server with apache. In the www folder I would like to create subfolders for each website I would like to run with Laravel. Therefore it would be like:

www |_ domainA.com |_ domainB.com

I know already, that I should protect the laravel folders from being visible to public. So only the public folder content of the laravel apps should be in this subfolders of www, and all other folders should be kept on the same level like the www folder to increase security.

But what I would like to know is: Does every subfolder(website) needs its own laravel setup? or is it common to just setup 1 isntallation and point to the different public subfolders in www then?

1 Answer 1

1

I think you should have laravel for each app. This is the best way because your apps are not directly related.

If you have just one... im not even sure how that would work, a change made to one app would also affect the other especially if you think of scaling and other perfomance issues.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the advice. But if the www folder would have subfolders for each website and I would move a laravel instance into each one of them, I would have again all folders visible. How would I restrict the visibility to the public folder inside the larval folders? Redirecting?
You can create sub domains in the server where you create a folder in www directory and point the subdomain to that folder and install your laravel app. This will mean all your apps are in the www folder and laravel htaccess will figure out how to route the app like normal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.