[solved] How to use "dist" folder as Apache's DocumentRoot?


  • | 434 points

    I'm a big time user of Laragon but recently due to some project restructuring the document root for my site has changed from the "/" to "/dist", i.e. all public files are now in "dist" folder.

    Anyway, so when I create a site say, example.test, Laragon creates a "auto.example.test.conf" for apache with the following config

    define ROOT "E:/projects/work/example/"
    define SITE "www.example.test"
    ...
    

    What I want instead is this (notice the "/dist/" part)

    define ROOT "E:/projects/work/example/dist/"
    define SITE "www.example.test"
    ...
    

    When I manually edit this file and "reload" apache the file reverts.

    Anyway to make my changes permanent or tell Laragon to use "dist" folder for ROOT in "auto.example.test.conf"?


  • | 434 points

    Ok, I figured it out. To make the changes permanent after changing the ROOT, I save the file "auto.example.test.conf" without the "auto" prefix, i.e. ""example.test.conf". So next time I reload apache, laragon automatically deletes the auto file and keep my new file with the custom DocumentRoot.

    Just posting this here in case anyone else stumbles upon this.

    I can't say it enough, but thanks Leo Kho so much for this wonderful piece of software! :)


Log in to reply
 

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