sk2
sk2

Reputation: 1181

Yii2 session problems for multiple application in single domain

We configured like /var/www/app1 and /var/www/app2 , Both are logging in single session. How can I make this different session.

I tried with following solution from yii2 wiki. But it doesn't workout here.

'identityCookie' => [
    'name' => '_backendUser', // unique for backend
    'path'=>'/advanced/backend/web' // correct path for the backend app.
]

Please give solution for this issue.

Upvotes: 3

Views: 1452

Answers (1)

topher
topher

Reputation: 14860

Use a different session $name for each application. This can be set in your config as:

'components' => [
    'session' => [
        'class' => '\yii\web\Session',
        'name' => 'mycustomname',

Upvotes: 5

Related Questions