0

I have the following apache vhost_alias configuration:

<VirtualHost *:80>
  UseCanonicalName Off
  ServerAlias localdev.*
  VirtualDocumentRoot /home/test/workspace/%2+/site
  ErrorLog ${APACHE_LOG_DIR}/wpdev-error.log
</VirtualHost>

this will allow me to do localdev.example.com,localdev.example.net.au,etc.

My problem is how do I configure the address= in dnsmasq?

Most of the tutorials I found uses subdomains as the wildcard or using the last part of the domain, i.e. example.com.dev which uses address=/dev/127.0.0.1.

Jenny D
  • 27,358
  • 21
  • 74
  • 110
budji
  • 111
  • 1

1 Answers1

2

You can't find a tutorial on how to do what you want because DNSMasq doesn't work like that. The documentation seems quite clear

-A, --address=//[domain/][]
Specify an IP address to return for any host in the given domains ...

Domains do not end in wildcards

Your best bet is to just put the host names you require in your hosts file. DNSMasq will return them preferentially to going to the wider DNS.

user9517
  • 114,104
  • 20
  • 206
  • 289