multi-tenancy with subdomain using the same project directory. #630
-
Hi!, I am using tenancy for laravel and with the same project directory code I need to achieve multitenancy. when I go to project.test (it works fine)
It all should direct me to www/project I tried adding *.project.test in hosts file |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
See this question on Configuring subdomain in Laragon #584 Once the subdomain is defined Apache can point to the same project, you do not need to create multiple directories. The project will need middleware to detect the subdomain. |
Beta Was this translation helpful? Give feedback.
Laragon edit the hosts (
C:\WINDOWS\system32\drivers\etc\hosts
) to point the domain to127.0.0.1
So each subdomain you need add to windows hosts manually because it does not supports wildcard.
Google Chrome always resolves
localhost
and*.localhost
and*.*.localhost
... to 127.0.0.1 without check windows hostsSo instead use
{name}.test
start use{name}.localhost