1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Apache localhost name and macbook

Discussion in 'Web Design and Development' started by Zillion, Feb 4, 2009.

  1. macrumors member

    #1
    Hi

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

    Code:
    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?
     
  2. Moderator emeritus

    angelwatt

    #2
    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.
     
  3. macrumors regular

    GroovyLinuxGuy

    #3

    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/
     
  4. macrumors member

    #4
    Thanks. I added in /etc/hosts on the Macbook

    Code:
    192.168.1.10 myserver
    
    and now it works. :)
     

Share This Page