Create a custom or blank project with auto virtual host


  • | 405 points

    Is it possible to have a 1 click quick create option for a empty project?

    Quick create > Custom: myblankproject

    • It will create a blank database called: myblankproject
    • Auto create a web folder: /myblankproject
    • Auto configure a virtual host: myblankprojec.dev
    • Auto configure the windows host file: 192.168.10.10 myblankprojec.dev

  • administrators
    | 68677 points

    Sure, it is very easy. Here how:
    Add this line to {LARAGON_ROOT}\usr\sites.conf

    Blank=C:\blank.zip
    

    Explanation:
    Blank: The name you want to show in Laragon Menu
    C:\blank.zip: path to an empty zip file. You can change it to C:\laragon\usr\blank.zip for portability.

    Ref:
    https://forum.laragon.org/topic/157/quick-create-websites-projects-configuration-file-format


  • | 405 points

    Thank you loekhoa thats too easy it worked great.

    If anyone needs to adjust the virtual host settings for their blank project see here: https://forum.laragon.org/topic/243/manually-configure-and-enable-virtual-hosts

    C:\laragon\etc\apache2\sites-enabled\auto.myblankproject.dev.conf

        DocumentRoot "C:/laragon/www/myblankproject/public/"
        ServerName myblankproject.dev
        ServerAlias *.myblankproject.dev
        <Directory "C:/laragon/www/myblankproject/public/">
            AllowOverride All
            Require all granted
        </Directory>
    </VirtualHost>
    

Log in to reply
 

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