Developing services on a macOS 10.14 machine, we would like to reach each different service with a subdomain (akin to what will happen in production).
Assume the machine's name is "bar", then we can access it with the bar.local
url.
Yet, we cannot find a way to redirect some (or all) subdomains to the same machine. E.g:
- service1.bar.local
- service2.bar.local
Is it possible to achieve such behaviour only using tools from the vanilla macOS 10.14 distribution, and without hardcoding the machine name in a config file (i.e., not explicitly duplicating the machine name in /etc/host
)?