0

I have DNSmasq setup properly to point any *.dev domains to localhost. My apache vhosts are all configured to the appropriate folders yet I am not getting any response from the local sites. I have been pulling my hair out and searching online for various answers without success. Just to point out that this setup worked previously and a High Sierra Security update just broke everything. Here is my host config:

<Directory "/www">
  Options Indexes MultiViews FollowSymLinks
  AllowOverride All
  Require all granted
</Directory>

<Virtualhost *:80>
  VirtualDocumentRoot "/www/home/wwwroot"
  ServerName home.dev
  UseCanonicalName Off
</Virtualhost>

<Virtualhost *:80>
  VirtualDocumentRoot "/www/sites/%1/wwwroot"
  ServerName sites.dev
  ServerAlias *.dev
  UseCanonicalName Off
</Virtualhost>

<Virtualhost *:80>
  VirtualDocumentRoot "/www/sites/%-7+/wwwroot"
  ServerName xip
  ServerAlias *.xip.io
  UseCanonicalName Off
</Virtualhost>

I just noticed that ping home.dev returns 127.0.0.1 but dig home.dev returns 127.0.53.53

And here is my DNS resolution:

DNS configuration

resolver #1
  search domain[0] : home
  nameserver[0] : 8.8.8.8
  nameserver[1] : 208.67.220.220
  if_index : 9 (en7)
  flags    : Request A records
  reach    : 0x00000002 (Reachable)

resolver #2
  domain   : local
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300000

resolver #3
  domain   : 254.169.in-addr.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300200

resolver #4
  domain   : 8.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300400

resolver #5
  domain   : 9.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300600

resolver #6
  domain   : a.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300800

resolver #7
  domain   : b.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 301000

resolver #8
  domain   : local
  nameserver[0] : 127.0.0.1
  flags    : Request A records, Request AAAA records
  reach    : 0x00030002 (Reachable,Local Address,Directly Reachable Address)

resolver #9
  domain   : dev
  nameserver[0] : 127.0.0.1
  flags    : Request A records, Request AAAA records
  reach    : 0x00030002 (Reachable,Local Address,Directly Reachable Address)

DNS configuration (for scoped queries)

resolver #1
  search domain[0] : home
  nameserver[0] : 8.8.8.8
  nameserver[1] : 208.67.220.220
  if_index : 9 (en7)
  flags    : Scoped, Request A records
  reach    : 0x00000002 (Reachable)
1

Ok I found the solution. dev domains seem to be official domains that you can register and therefore created a conflict in my DNS resolution causing it to point to 127.0.53.53 which is an IP usually attributed when a conflict arises. It means that *.dev had tried to resolve via my public DNS setting and via my localhost setting, creating a conflict. I switched my local development domain names over to *.test and everything worked straight away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.