Reputation: 2033
My vagrant file looks like this:
Vagrant.configure(2) do |config|
config.vm.box = "chef/centos-7.0"
#cent71 will be the server
config.vm.define :cent71 do |cent71|
cent71.vm.hostname = "cent71.nv.server"
cent71.vm.network :private_network, ip: "192.168.70.101"
end
end
While I am able to access 192.168.70.101:8080 on my host machine's web browser, I am unable to access it via cent71.nv.server:8080
What should I change?
Upvotes: 0
Views: 1545
Reputation: 343
You need to add an entry to your host machine's /etc/hosts file(I make the assumption you're using a mac or linux machine, no clue what to do on windows).
It should look something like the following.
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
# your mapping right here
192.168.70.101 cent71.nv.server
Upvotes: 1