Manually Configure and Enable Virtual Hosts


  • | 70 points

    Does anyone know how to enable a manually created virtual host?


  • administrators
    | 53459 points

    @skeith22:
    Just create a Virtual Host file without "auto." prefix, Laragon will respect any changes in the file.


  • administrators
    | 53459 points

    Assume you have a project name: myproj
    You can create a file name etc/apache/sites-enabled/myproj.conf with content like this:

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

    Note:

    • You may need to put myproj.dev entry to your hosts file.
    • The quickest way is let Laragon auto-create Virtual Hosts for you, then you just remove the "auto." prefix from the Virtual Host file.

Log in to reply
 

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