Reputation: 10833
When I develop new Webapps I generally edit /etc/hosts
and add the name of my new project say "greptweet" to the right of 127.0.0.1 localhost.localdomain
and then goto http://greptweet
which is hosted from my local system at /srv/www/greptweet
.
The problem is that if I am working with others in the same office or just want to show my app to them, they need to know my IP and alter their /etc/hosts
, which is cumbersome!
I was wondering if anyone can suggest a better solution for a office or impromtu gathering of Web developers, to share and develop a Web application running from a LAN?
We are all running different OSes: Archlinux, Android, ios, MacOSX & Windows. I don't think everyone altering their DNS configuration is feasible. Perhaps the local 192.168.1.1. DNS server can be overridden somehow and we can install a DNS server? But how to automagically update my IP with that server? Is there a DNS server on the Internet which can serve local IPs? e.g. I could quickly set foobar.example.com to serve 192.168.1.163?
Upvotes: 1
Views: 894
Reputation: 4424
You could solve that by setting up your own DNS server. But this requires that you change the DNS setting of other peoples's computers when you want to show them the website, which is no good solution.
I recommend that you buy your own domain name, let's say hendry.com
Now every time you create a new website, create a subdomain like greptweet.hendry.com, and point it at your webserver. This domain name is global, and will therefore work at other peoples' computers too.
The only thing that you have to keep in mind is that you must configure your webserver to have a vhost for greptweet.hendry.com as well, and then it will work.
EDIT: You may point any domain name to any IP you wish, even local ones.
Upvotes: 1