Add Custom Virtual Host in laragon

  1. Add a sub folder in laragon root.
  2. Rewrite .conf in D:\laragon\etc\apache2\sites-enabled
    Change DocumentRoot and Directory
  3. Reload Apache

Example:

<VirtualHost *:80> 
    DocumentRoot "D:/www/2019/pp/public/"
    ServerName topeak.test
    ServerAlias *.topeak.test
    <Directory "D:/www/2019/pp/public/">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

# If you want to use SSL, enable it by going to Menu > Apache > SSL > Enabled

Reference

  1. https://stackoverflow.com/questions/63318438/how-to-set-custom-virtual-host-name-in-laragon
  2. Tool
    https://github.com/bantya/CmdVirtualHost