How to make a subdomain with laragon

  • | 51 points

    hello, i was wondering if you could teach me on how to create a subdomain on laragon. because on my main root folder, i install a cms, and on my subdomain, i want to install another cms, such as a forum cms

  • | 7046 points

    It's been 3 days since I started with Laragon, but with what experience I got with it I can say that:

    1. Ensure that Auto virtual hosts is on.

    2. Say you have your main domain as, then you should create a folder named domain in the root {LaragonRoot}/www directory.

    3. Let's say that you want your subdomain as, you should create a folder named sub.domain in the root {LaragonRoot}/www directory.

    4. Now, reload Apache/Nginx or stop & restart the Laragon services.

    I have not tested this but it may work for you.

  • | 8 points

    @bantya Worked like a charm. Thx!

  • | 86 points

    If after this steps your subdomain redirects you to the main domain, you may want to comment the
    ServerAlias *.${SITE} line in the auto.domain.conf file and remove auto. prefix (to get domain.conf file) so the Laragon do not overwrite your changes, or you can edit the {LARAGON_ROOT}\usr\tpl\VirtualHost.tpl template file to apply it for all domains automatically.

Log in to reply

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