←back to thread

.localhost Domains

(inclouds.space)
301 points todsacerdoti | 3 comments | | HN request time: 0.611s | source
1. donatj ◴[] No.43644579[source]
We add a real actual DNS record for the local. subdomain pointing to 127.0.0.1

It works really well and means no setup on our developers machines

replies(1): >>43645280 #
2. oulipo ◴[] No.43645280[source]
Can you expand on this? you redirect *.local.example.com to 127.0.0.1, and then how do you setup the local machine so that eg myservice.local.example.com hits the correct port? I guess you still need a proxy somewhere? or you specify eg myservice.local.example.com:3000 ?
replies(1): >>43646484 #
3. donatj ◴[] No.43646484[source]
It's not a redirect. It's an actual A record on the domain for local.example.com -> 127.0.0.1

Then we just have an entry for local.example.com in our vhosts and bam everything works as expected. No need to mess with /etc/hosts