I'm on a mac, and have Virtual Box and Vagrant set up properly, using the avenuefactory/lamp box. I'm new to Vagrant, so I'm trying to see what is required to map local.example.com
to a code base located at ~/code/example/public
on my host machine. I've tried using the config.vm.network
in my Vagrantfile to point to a specific IP, but not sure how to edit Vagrant's equivalent of a vhosts file.
Again, I'm new to this so any help is greatly appreciated!
Your question is hard to understand Do you try to access to your code from virtual host? In this case Looks like you have to do following:
if you need to have access to your virtual host by name, then you need to add to
/etc/hosts
in host mashine something like: