Manually Configure and Enable Virtual Hosts


  • | 189 points

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


  • administrators
    | 123015 points

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


  • administrators
    | 123015 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


  • | 7046 points

    🙏

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


  • | 175 points

    Is there anyway to host a laravel project locallu using laragon nginx ?


  • administrators
    | 123015 points

    @ronssij : Laragon works very well with Laravel Nginx. Please check the auto generated virtual host and update the Document Root or let Laragon do it for you.


  • | 175 points

    Yes it is working fine if I acces on my machine. But I want to access laravel project on LAN.
    Is that possible with nginx?

    If yes. How?


Log in to reply
 

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