0

i setup few virtualhosts on my laptop, and all of them are name based for example :

  www.example1.dev
  www.example2.dev
  ...

and i want to access them with my real android device using USB cable. and im already conncted to same wifi network as well.

but everytime i try to access one of my virtualhost from my android device i get address not found i also checked this question How can I access my localhost from my Android device? but its related to ip address while im using name based virtualhost

edit 1 :

this is one of my virtual host setup that im trying to accessing it from my android device:

/etc/apache2/sites-avaliable/examplesite1.dev.conf :

<VirtualHost *:80>

    <Directory /var/www/examplesite1>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    
    ServerName examplesite1.dev.com
    ServerAlias www.examplesite1.dev.com
    
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/examplesite1


    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

and /etc/hosts :

127.0.0.1   examplesite1.dev.com
192.168.250.1   examplesite1.dev.com
192.168.1.51    examplesite1.dev.com
Sasha
  • 21
  • 7

1 Answers1

0

You can get access to the local host via:

http://192.168.1.1/{{service end points}}

it will help you to access the localhost from your mobile

Kamran Manzoor
  • 121
  • 1
  • 8