Reputation: 1
I'm having trouble finding a way to accessing the page of a virtual host (and the default Apache index.html page) on my Android phone. My hosts file on both my Android and PC use 127.0.0.1 as localhost and domain1.com. I've restarted my Apache server on my PC, and I can access it fine on my PC's browser at domain1.com, but I can't seem to access it on my Android browser. I've tried a public IP address, domain1.com, domain1.com:8000, 127.0.0.1:8000, localhost:8000... but none seem to work. They work on my local PC, though. Here's my httpd.conf file:
<Directory /home/*/public_html/>
AllowOverride FileInfo AuthConfig Limit
Order allow,deny
Allow from all
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
ScriptAlias /cgi-bin/ "/home/*/public_html/domain1.com/public/"
Listen 8000
NameVirtualHost *:8000
<VirtualHost *:8000>
ServerName domain1.com
DocumentRoot /home/*/public_html/domain1.com/public
</VirtualHost>
Upvotes: 0
Views: 3250
Reputation: 1007474
localhost
(a.k.a., 127.0.0.1
) on your phone points to your phone. localhost
on your PC points to your PC. Your PC is not your phone. Your phone is not your PC.
If you want your phone's Web browser to access your PC, use the IP address of your PC in the URL, along with your desired port number (8000
, apparently). Your PC's IP address is something other than localhost
.
Upvotes: 2