I wanted to be able to access my localhost from my iPhone. This article on Egalo told me how to do it.
Essentially, you run a Proxy Server from your laptop and point your device at the proxy in the wifi settings. The article suggests using SquidMan as a proxy, largely because it is fairly easy to set up and it’s free.
As Egalo explains, there’s two lines in the Squid template (conf file) that need some loving:
Comment out the http_access deny to_localhost
line like so:
# protect web apps running on the proxy host from external users # http_access deny to_localhost
And add the following line (and comment) in the file somewhere – I threw it at the bottom:
# hosts file hosts_file /etc/hosts
On the “Clients” tab of SquidMan preferences
Add an entry for your IP range. I enter the following on mine: 10.0.0.0/16
Once you’ve tweaked the template; added your allowed clients (see the article); started the proxy server; and pointed your device at the proxy server, you should be good to go!