Showing posts from June, 2013

Editing the hosts file on android virtual devices

I hosts several web sites on an Ubuntu server that I run at home, and I do this using Apache 2 name based virtual hosts. This allows me to host multiple web sites on the same server at the same IP address. This causes problems when trying to test how the websites look on mobile devices on the local network. To enable multiple sites to be hosted at the same ip address Apache2 will redirect the http request to correct web site files based on the domain name supplied with the http request. For example both and can resolve to the same ip address, but Apache will route requests to to the virtual name host files for site1 and requests to site2 to the virtual name host files for site 2. You can read more about this here . The problem with this set up is that I can't browse to the non-default virtual hosts using the IP address of my local server, and my ISP don't let requests from my IP address route back to my IP address, i.e. I can't browse to si