How to create subdomains and domains separate in Laragon?

  • | 1113 points

    In our project, we have the backend [laravel] hosted on the domain. For example:

    Our frontend Vue app hosted on the root domain: (

    How to accomplish this in Laragon?

  • | 1113 points

    Any update @leokhoa

  • administrators
    | 131219 points


    1. First, add to hosts file
    2. Add to the correspond Virtual Host. Remember to remove the auto. prefix of the file so Laragon will respect your changes.
    3. Reload Apache.

  • | 1113 points

    Actually, I followed this guide and did the following thing.

    1. Here is the etc\hosts file	   domain.test       #vue      api.domain.test   #laragon magic!  
    2. Renamed the "domain" to "api.domain" in laragon\www folder.

    3. Removed auto. prefix and now currently the file looks like this laragon\etc\apache2\sites-enabled\api.domain.test.conf

    It's still not working..

  • | 1113 points

    When accessing the api.domain.test, it displaying Laravel UI(Which is okay and expected!) But, when I access the domain.test it displays the laragon default view template?

    I hope you get what i'm saying. :) @leokhoa

Log in to reply

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