Vagrant on Mac os and hosts file issue

1

Editing file /etc/hosts

##
# 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

# Dev hosts
10.211.55.25    news.dev 360.dev

Only news.dev works, 360.dev can't be found.

Tried restarting Vagrant, but no success. I am running Ubuntu 14.04 on Vagrant with parallels.

UPDATE.

Here's the suggested output:

##$
# Host Database$
#$
# localhost is used to configure the loopback interface$
# when the system is booting.  Do not change this entry.$
##$
127.0.0.1^I^I^I^Ilocalhost$
255.255.255.255^I^I^I^Ibroadcasthost$
::1                                                    localhost $
$
# Dev hosts$
10.211.55.24    sportus.dev$
10.211.55.25    news.dev 360.dev sc.dev test.dev$
10.211.55.25   ^Inodejs-default-1472407165669-12306.shared nodejs-default-1472407165669-12306 #prl_hostonly shared$

Alexander Kim

Posted 2017-03-07T16:43:17.970

Reputation: 318

My first suspicion is that you have some invisible characters in the file causing trouble, probably a carriage return at the end (DOS/Windows uses carriage return and linefeed at the end of lines, but unix/macOS uses just linefeed). Try printing the file with LC_ALL=C cat -vet /etc/hosts. You should see something like 10.211.55.25^Inews.dev 360.dev$. If you see a ^M in there, that's a carriage return and it needs to be deleted. In any case, add the output to your question so we can see exactly what's going on. – Gordon Davisson – 2017-03-08T01:45:15.250

No answers