Accessing via 127.0.0.1 via home network

I am running Yosemite on a MacPro. I have an AMPPS installation with a file sharing database app running within it.

I access the files via 127.0.0.1 on a browser running on the Mac. How can I set this up to allow access from within the rest of my home network, using that address?


127.0.0.1 is the IP address that is assigned to your loopback interface. The general definition of "loopback" is as follows:

Loopback, or loop-back, refers to the routing of electronic signals, digital data streams, or flows of items back to their source without intentional processing or modification. This is primarily a means of testing the transmission or transportation infrastructure.

The hostname localhost, maps back to the loopback address.

So, in sort the loopback address goes nowhere but "loops back" to the originating host. This is how you can install and test a web service or database service, etc. without ever being connected to a network.

For other computers to access your services, you need to use the IP address on your LAN. This is usually eth0 if you are wired.

# ifconfig -a

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
        ether a8:20:66:39:2c:1c 
        inet6 fe80::aa20:66ff:fe39:2c1c%en0 prefixlen 64 scopeid 0x4 
        inet 192.168.1.100 netmask 0xffffff00 broadcast 192.168.1.255

So, for my Mac, my IP address is 192.168.1.100. If you issue the same command, you should be able to find your particular address. That's the address you need to use to access your computer.


You cannot with just ordinary TCP/IP let other computers access your web site on the Mac Pro using the IP address 127.0.0.1. This address has a special meaning in the IP protocol, and always refers to the local computer - never other computers.

If you really want to do so, you'll need to use port forwarding. You can use SSH to port forward the remote port 80 to the local port 80, and thus be able to access the remote AMPPS web site using the 127.0.0.1 address.

However, there's really no point in doing so. It won't make it faster, better or anything else. As you write no reason for wanting 127.0.0.1 specifically, it seems you're better off using an ordinary RFC1918 IP network on your home network - such as for example 10.x.y.z/8 or 192.168.x.y/16.