debian - Accessing nginx on a virtual machine from another computer -


i following tutorial on using chef. teacher uses vagrant set virtual machine, vagrant file contains this:

config.vm.network :hostonly, "33.33.33.10"

i didn't want use vagrant, created vm scratch , implemented other parts of vagrant file manually. i'm not quite sure does. goes onto updating hosts file in /etc/hosts include:

33.33.33.10 kayak.test 

then can access nginx server using "kayak.test" in browser on computer. can access server using private ip address "192.168.169.129" in browser, added name hosts file , can not access in same way. host file looks this:

127.0.0.1       localhost 127.0.1.1       jack.www.jack.co.uk jack  192.168.169.129   jack.test  ::1     localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters 

but cannot access jack.test in browser of other computer. need same functionality has?

thanks,

jack.

probably issue related avahi if have on system. rfc2206 explicitly defines .test .example .localhost other tld's invalid: http://www.rfc-editor.org/rfc/rfc2606.txt

as possible workaround can change line in /etc/nsswitch.conf way:

hosts: files mdns4_minimal dns mdns4  

do not forget restart avahi daemon after this.

source of workaround: http://avahi.org/wiki/avahiandunicastdotlocal


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -