Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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)
share|improve this answer
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 '12 at 11:20
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.