I have a web app called: (i substituted “LH” for “localhost” just for the purposes of this post)
http://LH/myapp/index.php/welcome
In my config.php, I used to have:
$config['base_url'] = http://LH/myapp/;
But in order to make it reachable from other machines on our network, I changed it to my machine name:
$config['base_url'] = http://mymachinename/myapp/;
I can load my site from other machines now, except from the box itself.
I’m running on ubuntu 12.04. Is there anything else i need to do besides edit my /etc/hostname file?
From the looks of it, you are accessing your app from LAN
which means, your computer is using a LAN IP. Which is configured at your router (i.e. main network router).
From your local machine, when you open your website, if you do it through localhost (LH) it might not work but, open your
/etc/hostsand add your LAN IP with yourmachine name, currently your machine name might be at 127.0.0.1 only.Hope it helps. If it doesn’t drop a comment 🙂