Manually Configure and Enable Virtual Hosts
-
Does anyone know how to enable a manually created virtual host?
-
@skeith22:
Just create a Virtual Host file without "auto." prefix, Laragon will respect any changes in the file.
-
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.
-
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
-
🙏
Hello, you can use this tool to generate the virtual host files.
-
Is there anyway to host a laravel project locallu using laragon nginx ?
-
@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.
-
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?