Manually Configure and Enable Virtual Hosts


  • | 189 points

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


  • administrators
    | 91344 points

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


  • administrators
    | 91344 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.

  • | 95 points

    Hello,
    i´m having some troubles working on Windows
    This is my .conf:
    <VirtualHost *:80>
    DocumentRoot "C:/laragon/www/urbanizaciones/public/"
    ServerName urbanizaciones.app
    ServerAlias *.urbanizaciones.app
    <Directory "C:/laragon/www/urbanizaciones/public/">
    AllowOverride All
    Require all granted
    </Directory>
    </VirtualHost>

    But it's not working


  • | 6431 points

    🙏

    Hello, you can use this tool to generate the virtual host files.


Log in to reply
 

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