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.

Wildcard DNS for the absolute beginner.

Discussion in 'Bind / DNS / Nameserver Issues' started by Lugie, Dec 9, 2005.

  1. Lugie

    Lugie Registered

    Joined:
    Dec 7, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello, I am trying to figure out how to activate wildcard DNS on my server.

    However, the only thing I have access to log into is WHM and SSH. In what manner do I go about editing the httpd.conf file? I have no idea how to access it on my server using these options.

    I do not know how to use SSH at all, however I have a program if somebody can lead me thru step-by-step.
     
  2. Envision5000

    Envision5000 Active Member

    Joined:
    Jul 5, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    What does wildcard dns do?
     
  3. Lugie

    Lugie Registered

    Joined:
    Dec 7, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Wildcard DNS allows *.domain.com to be resolved to any file you want - basically forwarding any subdomain that is nonexistant to any file/directory you determine.

    I just need to know how to edit files through SSH: mainly the ones I need to edit for wildcard DNS. I've never used SSH and would enjoy a helping hand to get me started - or be pointed in the right direction to learn how to use it.
     
  4. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    edit your zone file for the domain in question with *.domain.com A entry

    nano /usr/local/apache/conf/httpd.conf

    edit your virtual host container for the domain in question to look like this


    cntrol w search for domain.com



    <VirtualHost xxx.xx.xxx.xxx>
    ServerAlias www.domain.com domain.com *domain.com
    ServerAdmin webmaster@domain.com
    DocumentRoot /home/user/public_html
    BytesLog domlogs/domain.com-bytes_log
    User user
    Group user
    ServerName www.domain.com

    User user
    Group user
    CustomLog /usr/local/apache/domlogs/domain.com combined
    ScriptAlias /cgi-bin/ /home/user/public_html/cgi-bin/
    </VirtualHost>

    Control x save

    and restart apache
     
    #4 dalem, Dec 9, 2005
    Last edited: Dec 9, 2005
  5. cemlouis

    cemlouis Member

    Joined:
    Oct 27, 2005
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Is this also for subdomains?
     
  6. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Hello,

    In the case of sub domain, You should keep the sub domain virtual host container, before the main domain. Otherwise sub domain wouldn't work.
     
  7. cemlouis

    cemlouis Member

    Joined:
    Oct 27, 2005
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I used the exact same modification for subdomains is it ok? Or does it need modifications?

    Thank you,
    Cem
     
Loading...

Share This Page