ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label abhionlinux.co.cc. Show all posts
Showing posts with label abhionlinux.co.cc. Show all posts

2009/12/23

How to setup Wild Card Entry For a Domain

Edit the DNS zone file:-

Open the zone db file corresponding to the domain (For eg, domain.com)
[root@localhost ~]#vi /var/named/domain.com.db
Add the following line:-
================
* IN A IPaddress
=================
save and exit
restart named

[root@localhost ~]# /etc/init.d/named restart

Edit httpd conf file:-

[root@localhost ~]#vi /usr/local/apache/conf/httpd.conf

Add the following entry:-

===================
server alias *.domain.com
===================

save and exit

restart httpd

How to check DNS zone file configuration for errors

You can use the named-checkzone command to check the zone db for errors:-

[root@server]# named-checkzone abhionlinux.com /var/named/abhionlinux.com.db
Output:-
zone abhionlinux.com/IN: loaded serial 12
OK


or

[root@server]# named-checkconf /etc/named.conf