1

We have a local DNS server running for development purposes. But it seems not to resolve subdomains to the same destination ip as the domain itself. As I figured out so far, we need to configure each subdomain itself or using a wildcard, so that the following mapping would be possible:

vhost1.example.com => example.com => 192.168.0.22
vhost2.example.com => example.com => 192.168.0.22
something.example.com => example.com => 192.168.0.22

Normally, in the internet, if you bought a domain this works just fine with subdomain (vhost) wildcard on the domain. Until now, there was no need for me to configure it on my owned domains. But locally on a Mac Server we have to configure it?!

After searching hours on the internet I found no solution that works for me. This post here does also not work for me.

We are using Mac OS X El Captian 10.11.6 on the server.

Edit: And yes, I cleared the cache after editing the DNS config by using the command dscacheutil -flushcache;killall -HUP mDNSResponder;say flushed as root user (sudo su)

  • I have no problem to get the linked solution workin' in El Capitan (& OS Server) – klanomath Jan 25 '17 at 15:26
  • @klanomath what have you exactly done? Did you copied from the author or did you use the simple solution? I tried both – alpham8 Jan 25 '17 at 21:14
1

This is how i usually do:

  1. Add primary domain example.com
  2. Add Machine Record example.com (inside domain example.com) with ip : 192.168.0.22
  3. Add alias vhost1.example.com -> example.com
  4. Add alias vhost2.example.com -> example.com

... etc you can add other records as usual

  • I want dynamic alias using asterik *. You cant type this into gui. If you do it on console, you can type it in, but it doesn't work neither. This is the common internet solution for subdomaining. It works on all dns servers in the internet. – alpham8 May 8 '17 at 7:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .