Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

migrated from stackoverflow.com Mar 20 '10 at 18:38

This question came from our site for professional and enthusiast programmers.

3 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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

instead.

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.