my hostname is newton ...when I set "127.0.0.1 Newton" in /etc/hosts .. parallels stops working.. when I set "127.0.0.1 localhost" in /etc/hosts apache installed via ports stops working.. when I add both '"127.0.0.1 localhost", and "127.0.0.1 newton" to hosts file.. parallels network doesnt work
I'd say, this is not generally wrong. You definitely should leave the first few lines in your /etc/hosts file:
127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost # Add additional host names below: 127.0.0.1 newton 127.0.0.1 testhost 127.0.0.1 something
I've got such a configuration myself on Mac OS 10.6 (Snow Leopard) and had this on 10.5 (Leopard) as well, with Parallels Desktop and Apache still working.
But this configuration does not mean your additional hostnames are working on your virtual machines in Parallels as well. Edit the host files on each VM separately.
Don't play with "/etc/hosts"! The original file is as follows, don't change it:
## # 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 fe80::1%lo0 localhost
Most likely, you need to change the name and/or address on which you bind in your Apache configuration.
is there any reason you could not have it as
127.0.0.1 localhost newton testhost something 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost
And in some cases you want to specify hosts. Especially on internal networks like I have where you do not have a DNS host setup. (House Lans and clusters that do not see outside world)
so I define the ipaddress and names in the host files so that computers can talk to each other without the hassle of setting up a DNS server.