I'm facing a little problem of accessing a virtual host through the android mobile. Before I describe my problem, let me describe a little bit my environment:
- MAC OSX 10.9.5;
- Smartphone Android 4.4.4;
- Virtual host working perfectly on my localhost;
- internal dns working perfectly in the /etc/hosts file.
I've set up proxy on my android mobile that points to my localhost on the same network, i.e:
Localhost IP: 192.168.0.100
Mobile IP: 192.168.0.101
Proxy IP set up: 192.168.0.100:80
If I access localhost, the following virtual host setting, on mobile it works perfectly.
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Users/myusername/Sites/app/"
ErrorLog "/private/var/log/apache2/localhost-error"
CustomLog "/private/var/log/apache2/localhost-error" common
</VirtualHost>
In this case, it lists all projects inside the app folder.
However, if access base.lo, the following virtual host setting, on mobile it doesn't work.
<VirtualHost *:80>
ServerName base.lo
ServerAlias www.base.lo
DocumentRoot "/Users/myusername/Sites/app/base/"
ErrorLog "/private/var/log/apache2/base-error.log"
CustomLog "/private/var/log/apache2/base-error.log" common
</VirtualHost>
In this case, it redirects from base.lo to base.lohttp/base.lo/. This last one is the problem.
How can I solve it? Has anyone ever experienced it?
Thanks in advance.
André Vieira.
Aucun commentaire:
Enregistrer un commentaire