Suggest to disable ServerAlias (or fix it)
-
Sometimes we need to create an application with multiple domain (multi tenant). Laragon come with automatic virtualhost detection, also by default it will create a wildcard alias in Apache configuration. I suggest to disable automatic wildcard ServerAlias, here is my reason:
We need to create an app with multiple domain, for example the domain are:
example.test
andapi.example.test
.So, we have to create a folder with
example
for the name, so Laragon will create virtualhostexample.test
and wildcard ServerAlias, so we can useanything.example.test
for the domain.The problem is, if we create a multi tenant inside a subdomain, for example
app.example.test
, andapi.app.example.test
, ServerAlias give*.example.test
, not*.app.example.test
.
-
@riespandi :
Virtual Host content is configurable, you can change it by modifying the template in:
{LARAGON_ROOT}\usr\tpl\VirtualHost.tpl