One of useful features of Laragon is Auto Virutal Hosts
Just put your project (ex. mysite
) in the Document Root (C:\laragon\www) and click “Reload“ button, you’ll have this pretty url:
http://mysite.test
You can change the url format the way you want in Menu > Preferences - just update the {name}.test
pattern.
With the mysite
example above:{name}.local -> mysite.local
{name}.dev.com -> mysite.dev.com
NoteEach project has each own Virtual Host file located in:
For Apache:
{LARAGON_ROOT}\etc\apache2\sites-enabled\auto.{project}.test.conf
For Nginx:
{LARAGON_ROOT}\etc\nginx\sites-enabled\auto.{project}.test.confContent of a .conf file is auto generated. If you have a specific project which has modified content, just remove the auto. prefix, Laragon will keep the content of the .conf file intact.
Virtual Host content is configurable, you can change it by modifying the template in:
{LARAGON_ROOT}\usr\tpl\VirtualHost.tpl
Note: The usr folder is where you keep your own configurations, Laragon respects your changes on any files in the folder.