Home > Article > Backend Development > laravel multiple domain name login problem such as qiyue.io me.qiyue.io
A website has one main domain name, multiple sub-domain names, and a common login. I found out later
You can log in to the main domain name, but you cannot log in to the subdomain name. After logging in to the main domain name, you still cannot log in to the subdomain name. Moreover, clicking login on the subdomain name will jump back to the homepage of the subdomain name, and you cannot enter the login page
How to solve it?
Using Laravel 5.2.*
For example: main domain name qiyue.io
sub-domain name blog.qiyue.io
A website has one main domain name, multiple sub-domain names, and a common login. I found out later
You can log in to the main domain name, but you cannot log in to the subdomain name. After logging in to the main domain name, you still cannot log in to the subdomain name. Moreover, clicking login on the subdomain name will jump back to the homepage of the subdomain name, and you cannot enter the login page
How to solve it?
Using Laravel 5.2.*
For example: main domain name qiyue.io
sub-domain name blog.qiyue.io
Session synchronization:
Requires the following three steps
redis save session
session is changed to
The secrets of the two projects have been changed to the same