3

I am developing a website and I'd like to look at it from my mobile phone (which is right next to the dev computer, on the same LAN). The development is on a dev computer with XAMPP. The local domain used for development (which is defined in "hosts" file only on the dev computer) is dev.example.com

The mobile phone is capable of browsing the internet, using wireless LAN from the same router. But after typing dev.example.com in the mobile phone, I receive "Gateway not responded". Of course, it just doesn't see the dev's computer "hosts" file...

How can I best access my local web server with my phone?

Should I better reconfigure my mobile phone or the router?

1
  • Someone seems to have flagged this question as off-topic. I don't think so. The problem seems to be entirely on your dev computer. Hence it is a computer question.
    – user477799
    Apr 22, 2017 at 6:13

2 Answers 2

3

You most probably want to do one of these:

  • http://192.168.0.xxx/your/app/path (your dev PC's IP), circumventing DNS altogether
  • Editing the hosts file on your mobile instead of the dev PC (needs a jailbroken or rooted device)
  • Log in to your router/accespoint and give your Dev-PC a local domain (if your router allows that)
1
  • 1
    I managed to connect using just http:// 192.168.3.149 (without any path, because for my site Drupal with Domain Access module didn't like a path). In my case, the following config changes were necessary: 1. in local comp apache config, disable all virtual hosts and change document root to the the site dir, 2. in mobile phone define local WLAN Access Point (before I tried to connect using Packet Data access point which obviously didn't work) and configure Internet to use this access point.
    – camcam
    Jul 21, 2012 at 11:20
1

All of those options ce4 said,

or simply, upload from your local server to development server where subdomain dev.domain.com resides and test it from there. otherwise you are up for allot of trouble.

You could also set-up real domain dev.domain.com to point to your IP through A record. So it would "really" resolve to your laptop instead of trying to trick every device on your network.

Not the answer you're looking for? Browse other questions tagged .