Help to check my hack Wildcard DNS right or correct or not

iamnewbies

Registered
Jun 1, 2006
4
0
151
I would like modify my cpanel to support Wildcard DNS

I do hack 2 file

/usr/local/cpanel/etc/zonetemplates/simple

/usr/local/cpanel/etc/httptemplates/apache1/default


for
/usr/local/cpanel/etc/zonetemplates/simple

add this line
* 14400 IN A %ip%

(at bottom line)


Code:
%nameserverentry%. IN A %nameservera%
%nameserverentry2%. IN A %nameservera2%
%nameserverentry3%. IN A %nameservera3%
%nameserverentry4%. IN A %nameservera4%

%domain%. IN A %ip%

localhost.%domain%. IN A 127.0.0.1

%domain%. IN MX 0 %domain%.

* 14400 IN A %ip%

and

for

/usr/local/cpanel/etc/httptemplates/apache1/default

add this line
ServerAlias *.%serveralias%


(at bottom line)

Code:
!namevirtualhost=1!
NameVirtualHost %ip%:80

!namevirtualhost!
<VirtualHost %ip%>
ServerAlias %serveralias%
ServerAlias *.%serveralias%
ServerAdmin %serveradmin%
DocumentRoot %docroot%
ServerName %servername%
!usecannameoff=1!
UseCanonicalName off
!usecannameoff!
!dirprotect=1!

<IfModule mod_userdir.c>
  Userdir disabled
  Userdir enabled %user% %dirusers%
</IfModule>
!dirprotect!
!phpopendir=1!

please help to advice and suggestion me for best modify and can work without bug or wrong script runing.