K
K
k600ii2016-01-12 12:06:48
Yii
k600ii, 2016-01-12 12:06:48

What is the best way to organize multiple sites in Yii2?

For example, there is site1 and site2, I need them to use a common database (users, including a personal account, etc.). I assume that this is done in a similar way to the frontend and backend. I create a directory in the same way (for example, frontend2), prescribe settings for it, set up .htaccess so that you can go under the desired address. As a result, at site1.local/* I get into frontend1, and at site2.local/* into frontend2. The question is how right this is and, if this is not an option, then how to do it right.
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Natarov, 2016-01-12
@HanDroid

So you can implement this option. After all, you already have two applications. Frontend - One application per client.
Backend - admin application, the second.
The framework also serves for such global tasks. Nothing prevents us from combining or enabling users of one site to access another (for example, through tokens). But in this case, you need a powerful server. since requests will not load the framework, but the server. And if you put a server on one, the second site will die the same way. It's a matter of your code and overall performance.
Here's another from the official www.yiiframework.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question