So, lately I’ve been working on some projects, using Laravel is great, but I can’t figure out how to properly set up the VirtualHost, because everytime I do, I can only visit the current project I am working on, other links giving me errors.
<VirtualHost *:80>
DocumentRoot /Users/JonSnow/Sites/MySite/public
ServerName mysite.dev
</VirtualHost>
I have this on the end in my httpd.conf, how can I properly change it to allow me to visit localhost/ and other project installations?
Current:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:/Users/www
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:/Users/game/public
ServerName localhost/game
</VirtualHost>
Now… I just want localhost to be my ordinary and simply point localhost/game to the public folder.
You should be able to pull it off with:
as long as
NameVirtualHost *:80is added somewhere in yourhttpd.conffile.That works for me anyhow 🙂