php - Two Laravel Apps in one host only one app can login -
i have 2 laravel 5.2 apps in 1 host, 1 production , other staging. both have own database respectively. problem is, whenever login 1 app, other app fail login. know how deal it?
i found answer it's not working 2 laravel apps, 1 can login
here's configuration session.php
'driver' => env('session_driver', 'file'), 'files' => storage_path('framework/sessions'), 'cookie' => env('session_name', 'laravel_local'), 'path' => '/', 'domain' => null,
it appear cookie used reference session being shared between both apps.
make sure both apps have different value cookie
config in config/session.php
config file.
'cookie' => 'laravel_session',
alternatively if using .env files (which noticed are) set cookie name, make sure change appropriate variable in .env file each app.
be sure clear browsers cookies after making change.
if possible creating subdomain staging.yoursite.com
staging app ideal solution prevent cookies being shared between 2 applications.
Comments
Post a Comment