LinuxHelps.com

A blog for Linux Lovers.

Posted by sibu on March 10, 2009

Wild card DNS

Edit the httpd.conf and go to the users entry.

EG:

ServerAlias domainname *.domainname.com

Change to:

ServerAlias domainname.com *.domainname.com

Edit the DNS Zone for the domain in question and add the following.

* CNAME domain.com.

Edit the /var/name/domain.com.db zone file and add the following:

* IN A x.x.x.x

Where you replace the ‘x.x.x.x’ with the correct IP. (wildcard DNS can also be a CNAME record pointing to the domain name)

You then need to edit the httpd.conf file and change the ‘ServerName’ directive to the domain name (without the ‘www’ in front) and change the ‘ServerAlias’ directive to *.domain.com. Save and restart Apache.

To test ping asdflkj.domain.com, you should get an IP response.

Add A Comment