Support the ongoing development of Laravel.io →
Configuration Session

Hi guys!

I was experimenting on sharing a session between two laravel applications using the redis driver.

Here is what I did,

  1. Created two laravel applications in my htdocs folder that I access using "dummy.site" and "dummy2.site"
  2. Changed the session driver on both files to "redis" and the connection to "default"
  3. I made sure that both the session.php and database.php files of both application are identical.

I got the session using the redis driver working but they were not able to share the value that i stored in the session. I could retrieve it from the "dummy.site" app that set the session value but the "dummy2.site" app could not get the value.

Another thing, I also tried changing the domain key in the session.php file to "*.site" but it still didn't work.

Can anyone tell me how to fix this or what might went wrong?

Thank you!

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.