title: Access local apache virtualhost on Android (same network)
body: <p>I have a computer and an S3 on the same wifi network, the computer has apache running with VirtualHost for <a href="http://example.local" rel="nofollow">http://example.local</a>, along with a few others. This all works fine from the computer. Computer IP is 10.0.0.2</p>
  
  <p>The phone is rooted, I appended <code>10.0.0.2 example.local www.example.local</code> to /system/etc/hosts and it couldn't find the domain, even though ping worked. I tried some SO solutions to this but none fixed it, so instead I removed default <code>hosts</code> file and kept the top line as my <code>10.0.0.2</code> definition. This now connects to my machine in browser, but it just loads the <code>localhost</code> vhost config, instead of the <code>example.local</code> one.</p>
  
  <p><code>httpd-vhosts.conf</code> on computer</p>
  
  <pre><code>&lt;VirtualHost localhost:80&gt;
      ServerAdmin tom.corby@tastecard.co.uk
      DocumentRoot "C:/xampp/htdocs"
      ServerName localhost
      ErrorLog "logs/error.log"
      CustomLog "logs/access.log" common
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost www.example.local:80&gt;
      ServerAdmin tom.corby@tastecard.co.uk
      DocumentRoot "C:/xampp/htdocs/www.example.co.uk/branches/release/3.4/www/"
      ServerName www.example.local
      ServerAlias example.local
      ErrorLog "logs/www.example.local.log"
      CustomLog "logs/www.example.local.log" common
  
      &lt;Directory "C:/xampp/htdocs/www.example.co.uk/branches/release/3.4/www/"&gt;
          Options Indexes FollowSymLinks
          AllowOverride All
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Like I say this loads fine on the computer, and I can load <code>localhost</code> for my xampp/htdocs directory, or example.local for the deeper project directory. All I ever get on android is <code>localhost</code> directory</p>