Re:Give HN: *.til.io resolves to 127.0.0.1
by Kiro on Friday November 21, 2014 @02:21PM
(#8642828)
Can someone explain what the puprose is?
[ Parent
| on HN ]
If you develop multiple websites on your local machine, you distinguish them by using different domain names for each of them. You might have site1.dev and site2.dev.
There are a variety of methods to handle this, but commonly you add a record to your system's host file to resolve these domain names to the ip address 127.0.0.1 (your local computer).
Using site1.til.io and site2.til.io instead eliminates having to manage that host file (which is a minor and repetitive annoyance).
Re:Give HN: *.til.io resolves to 127.0.0.1
by drcode on Friday November 21, 2014 @02:51PM
(#8643030)
Is the point of this that a proxy server on your local machine has access to the domain names (site1.til.io and site2.til.io) and can forward the request to the appropriate service on your local machine by modulating on the subdomain?
Re:Give HN: *.til.io resolves to 127.0.0.1
by Touche on Friday November 21, 2014 @02:38PM
(#8642947)
If it's completely client side you can just put a ~/dev folder under Apache / nginx and never have to worry about any of that.
Re:Give HN: *.til.io resolves to 127.0.0.1
by a-priori on Friday November 21, 2014 @02:47PM
(#8643005)
I've also used xip.io (a similar service) when testing a web application that did multi-tenancy via subdomains.
Re:Give HN: *.til.io resolves to 127.0.0.1
by 8draco8 on Friday November 21, 2014 @02:46PM
(#8642999)
If you are using OSX try to use virtualhost.sh, it,a available in Brew and makes adding new vhost quick and easy
Re:Give HN: *.til.io resolves to 127.0.0.1
by monk_e_boy on Friday November 21, 2014 @02:28PM
(#8642870)
.dev? heathen! .local please :)
Re:Give HN: *.til.io resolves to 127.0.0.1
by jatoben on Friday November 21, 2014 @02:34PM
(#8642916)
Careful; if you or your coworkers use OS X, you may run into conflicts with Bonjour-registered hostnames.
Re:Give HN: *.til.io resolves to 127.0.0.1
by jcampbell1 on Friday November 21, 2014 @03:11PM
(#8643143)
.local has special handling that you don't want on OSX. Use .dev
For instance: http://www.charlesproxy.com/documentation/faqs/accessing-loc...
Re:Give HN: *.til.io resolves to 127.0.0.1
by astrodust on Friday November 21, 2014 @02:36PM
(#8642928)
.local conflicts with Bonjour, so it's not as good.
I actually was using .local previously, but my co-workers all use .dev so I assumed that was more common ;p.
Re:Give HN: *.til.io resolves to 127.0.0.1
by FireBeyond on Friday November 21, 2014 @04:08PM
(#8643389)
I use .lan - shorter, and doesn't mess with OS X.
Re:Give HN: *.til.io resolves to 127.0.0.1
by Supermighty on Friday November 21, 2014 @02:31PM
(#8642893)
I've always used mywebsite.localhost
Re:Give HN: *.til.io resolves to 127.0.0.1
by reustle on Friday November 21, 2014 @02:25PM
(#8642851)
For example, I use dev.projectname.com for every project I work on locally. This way, the auto-filled usernames/passwords never get mixed up between projects, as they do when you do everything on 127.0.0.1:8000