PDA

View Full Version : Apache localhost name and macbook




Zillion
Feb 4, 2009, 05:15 AM
Hi

I have Apache running on a small Ubuntu server in my home network. In /etc/hosts it says :


127.0.0.1 localhost
127.0.1.1 myserver

Now on a PC in my network I can just type http://myserver/ but on my Macbook Pro it can't find the server. If I type http://192.168.1.10/ it can find it. How can I let the Mac also find it?



angelwatt
Feb 4, 2009, 06:21 AM
Were you editing the etc/hosts on Ubuntu, or on the Mac. It needs to be done in both places. Also, I think you have a typo in the etc/hosts you provided, the extra '1' on the second line.

GroovyLinuxGuy
Feb 4, 2009, 08:20 AM
Were you editing the etc/hosts on Ubuntu, or on the Mac. It needs to be done in both places. Also, I think you have a typo in the etc/hosts you provided, the extra '1' on the second line.


The 127.0.1.1 is fine, but you need to add your Ubuntu server to your Mac's hosts file.
There are some other modifications that you may want to make. Have a look here
http://httpd.apache.org/docs/

Zillion
Feb 4, 2009, 11:58 AM
Thanks. I added in /etc/hosts on the Macbook


192.168.1.10 myserver


and now it works. :)