Suggest to disable ServerAlias (or fix it)


  • | 191 points

    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 and api.example.test.

    So, we have to create a folder with example for the name, so Laragon will create virtualhost example.testand wildcard ServerAlias, so we can use anything.example.test for the domain.

    The problem is, if we create a multi tenant inside a subdomain, for example app.example.test, and api.app.example.test, ServerAlias give *.example.test, not *.app.example.test.


  • administrators
    | 111240 points

    @riespandi :
    Virtual Host content is configurable, you can change it by modifying the template in:
    {LARAGON_ROOT}\usr\tpl\VirtualHost.tpl

    Ref: https://laragon.org/docs/pretty-urls.html


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.