If you need to test a web application on smart phones and tablets, xip.io’s wildcard DNS can help. Using xip.io you can access an application running on a local IP address, say: 192.168.1.10 with http://192.168.1.10.xip.io (or any subdomain variant) from any other device which is on the same network.

So if you are running a web server such as nginx or an old Apache, you can set up subdomain prefixes to access different web applications.

If you use nginx and are serving a sub directory: foo from your www directory, you can access foo with http://foo.192.168.1.10.xip.io by updating your nginx.conf with this gist:

If you are using Apache, you can make an entry to your httpd-vhosts.conf file:

ServerAlias foo.*.xip.io

Note: This is just a quick way of connecting devices to a local IP web server. It avoids edits to /etc/hosts or using dnsmasq. If you want a more complete discussion of xip.io, see: Hacker News