Y
Y
Yaroslav Alekseenko2018-10-24 12:41:09
Domain Name System
Yaroslav Alekseenko, 2018-10-24 12:41:09

How in MacOS to set the route of all domains on .dev not to localhost, but to a machine on the local network?

Good afternoon, colleagues!
For development, I have Air 13 and configured MAMP + dnsmasq + resolver for .loc domains ... There are other hosts on the local network in the office that have a similar package, but different domain endings, like ".dev" or ".lo" . How to configure on each machine so that:
.loc goes to 127.0.0.1
.dev goes to 192.168.1.150
.lo goes to 192.168.1.151 I guess
the recipe for Linux or FreeBSD (aka BSD) can be adapted too.
Thanks for the help!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stalker_RED, 2018-10-24
@webdevfan

Domains .devhave not been recommended for development for several years, because this is no longer a "fictitious domain" but quite someone's property . And browsers can swear if you start wrapping these domains anywhere.
In general, it is enough to register the corresponding addresses and domains in hosts, or raise your DNS on one of the computers or on the router. Lightweight maradns or serious bind9. You can even raise it under Windows.
By the way, in the version with DNS, you can register a wildcard, and then requests for any word.local will go to the server that you specify. Then, when adding a new project, you can not touch the dns settings at all, just slip the new folder to the web server.

A
Aborigen1020, 2018-10-24
@Aborigin1020

host file?
127.0.0.1 name name.loc
192.168.1.150 name name.dev
192.168.1.151 name
name.lo

S
shiza88, 2018-10-31
@shiza88

The most inexpensive and fastest way is to register DNS on your gateway. Now this allows you to make even the cheapest Chinese gateway.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question