The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Bind / DNS / Nameserver Issues' started by iamnewbies, May 23, 2007.

  1. iamnewbies

    iamnewbies Registered

    Joined:
    Jun 1, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
Loading...

Share This Page