Organizing root folder with client folders?

  • | 93 points

    Hello, I just checked Laragon and it looks like a great tool. I just have one doubt.

    I usually organize my projects in a folder structure like this:


    Do I have to set the document root each time to /CLIENTS/[client_name]/?
    Or is there a way to set /CLIENTS/ as document root, and have Laragon find the projects in each subfolder?

  • administrators
    | 131219 points

    @stepunk : You can change the DocumentRoot in Menu > Preferences

  • | 285 points

    Re: Organizing root folder with client folders?

    Hi, I know this thread is a few months old, but I have a related issue so using this example here, but I can start a new thread if needed?

    The pretty URL's pick up automatically from the root folder, but I can't work out how to point them to sub folders like the example. Ideally I want to switch quickly without having to change the document root each time.


    • /CLIENTS/Client_1/Project_a
    • /CLIENTS/Client_1/Project_b
    • /CLIENTS/Client_2/Project_c

    I'd like to be able to access via

    • project_a.test
    • project_b.test
    • project_c.test etc.

    I tried to set up a manual config file in C:\laragon\etc\apache2\sites-enabled, with auto. prefix removed and adding


    <VirtualHost *:80>
    DocumentRoot "C:/CLIENTS/Client_1/Project_a/"
    ServerName project_a.test
    ServerAlias *.project_a.test
    <Directory "C:/CLIENTS/Client_1/Project_ac/">
    AllowOverride All
    Require all granted

    hosts file: project_a.test #laragon magic!

  • administrators
    | 131219 points

    @sccowl : 80% of the time, we will not work on both Client_1 & Client_2
    Therefore, in your case, I just switch Document Root using Menu > www > Switch Document Root

    • When you switch to /CLIENTS/Client_1, Laragon will create project_a.test & project_b.test
    • When you switch to /CLIENTS/Client_1, Laragon will create project_c.test

    Otherwise, you can use multiple instances of Laragon:

  • | 560 points

    Here is how I have mine set up.
    Laragon Data Dir: C:\laragon\data
    My Document Root: C:\Users\qwerty\www

    Inside of C:\Users\organ\www I have various clients and projects. I even have Adminer (which I use instead of PHPMyAdmin for easy access.

    In your taskbar - right-click Laragon > Apache > sites-enabled and select the project you want to edit. Change DocumentRoot and Directory to the path of your VirtualHost.

    This comes in super handy. For example I have one project (with 2 VirtualHost "domains") where I have javascript and css fully minimized and concatenated for production but in the same project folder I have everything scattered for testing & development. Only difference is the URL (dev.client.webdev & prod.client.webdev) but both being served from the same project folder.

    I hope this helps.
    If you need further explanation, please let me know.

Log in to reply

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