Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Member
    Join Date
    Jul 2003
    Posts
    36

    Default Wildcard DNS

    I have this in httpd.conf:

    #ServerAlias www.hiphoprappers.com hiphoprappers.com
    ServerAdmin webmaster@hiphoprappers.com
    DocumentRoot /home/hhr/public_html
    BytesLog domlogs/hiphoprappers.com-bytes_log
    ServerAlias *.hiphoprappers.com hiphoprappers.com
    ServerName www.hiphoprappers.com
    User hhr
    Group hhr
    CustomLog domlogs/hiphoprappers.com combined
    #RedirectMatch 301 (.*) http://hiphoprappers.com$1
    ScriptAlias /cgi-bin/ /home/hhr/public_html/cgi-bin/

    and this in hiphoprappers.com.db in the named folder:

    ; Modified by Web Host Manager
    ; Zone File for hiphoprappers.com
    @ 14400 IN SOA ns1.wisd0m.net. root.server1.wisd0m.net. (
    2004041524
    28800
    7200
    3600000
    86400
    )

    hiphoprappers.com. 14400 IN NS ns1.wisd0m.net.
    hiphoprappers.com. 14400 IN NS ns2.wisd0m.net.
    hiphoprappers.com. 14400 IN A 216.12.200.18

    localhost.hiphoprappers.com. 14400 IN A 127.0.0.1

    hiphoprappers.com. 14400 IN MX 0 hiphoprappers.com.

    mail 14400 IN CNAME hiphoprappers.com.
    www 14400 IN CNAME hiphoprappers.com.
    ftp 14400 IN A 216.12.200.18
    www2 14400 IN A 216.12.200.18
    www.www2 14400 IN A 216.12.200.18
    studio 14400 IN A 216.12.200.18
    www.studio 14400 IN A 216.12.200.18
    test 14400 IN A 216.12.200.18
    www.test 14400 IN A 216.12.200.18
    *.hiphoprappers.com. 14400 IN A 216.12.200.18


    I used this guide:

    http://photomatt.net/archives/2003/1...d-sub-domains/

    And it is not working. All newly created valid subdomains still get redirected by the wildcard line in httpd.conf. Any ideas?

    Thanks!

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    And it is not working. All newly created valid subdomains still get redirected by the wildcard line in httpd.conf. Any ideas?
    What do you mean by, "it is not working". What you've configured will do exactly what you've said it does. The wildcard DNS directs *.yourdomain.com to your server. The ServerAlias of *.yourdomain.com will make Apache grab any URL starting *.yourdomain.com and match it to the DocumentRoot for www.yourdomain.com. What did you expect to happen?
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member phpman's Avatar
    Join Date
    Sep 2003
    Location
    Rio de Janeiro - Brazil
    Posts
    50

    Default

    Hello

    Edit /scripts/wwwacct

    --x---x---x---x---x---x---x

    pico -w /scripts/wwwacct

    search for '14400'

    see:

    $domain. 14400 IN MX 0 $domain.

    mail 14400 IN CNAME ${domain}.
    www 14400 IN CNAME ${domain}.

    substitute for:

    $domain. 14400 IN MX 0 $domain.

    mail 14400 IN CNAME ${domain}.
    www 14400 IN CNAME ${domain}.
    * 14400 IN A $nip


    and search '<VirtualHost $ip>'

    see:

    <VirtualHost $ip>
    ServerAlias www.$domain $domain
    ServerAdmin webmaster\@$domain
    DocumentRoot $mnt/$user/public_html
    ServerName www.$domain


    substitute for:

    <VirtualHost $ip>
    ServerAlias *.$domain $domain
    ServerAdmin webmaster\@$domain
    DocumentRoot $mnt/$user/public_html
    ServerName www.$domain


    Important: The change done in <VirtualHost $ip> IS NOT IMPORTANT, SCRIPT WORKS PERFECTLY WITHOUT HER.


    Save and protect:

    ctrl + o
    ctrl + x
    chattr +i /scripts/wwwacct

    Huggs
    Last edited by phpman; 04-16-2004 at 06:01 AM.
    Flávio Pedro
    Intellinoc Specialists
    ---
    Software installation, 24/7 server management,and security.
    hardening Red Hat Certified Engineer | Certified Information Security Systems Professional

    ---
    Intelligent Solutions - Intelligent People
    dedicated servers, collocation, shared and reseller hosting, managed solutions and background services.

  4. #4
    Member
    Join Date
    Jul 2003
    Posts
    36

    Default

    Thanks for the advice!

    My problem is all subdomains point to the main domain, but when I want to create a valid subdomain such as "test.hiphoprappers.com" it is still caught by the wildcard dns....

    Any ideas?

  5. #5
    Member phpman's Avatar
    Join Date
    Sep 2003
    Location
    Rio de Janeiro - Brazil
    Posts
    50

    Default

    Yesterday the night I configured that for my customer.

    See: www.svclub.com.br

    Create a subdomain and see how it works:

    To be necessary of help uses the msn: support01@brnoc.com

    Hug
    Flávio Pedro
    Intellinoc Specialists
    ---
    Software installation, 24/7 server management,and security.
    hardening Red Hat Certified Engineer | Certified Information Security Systems Professional

    ---
    Intelligent Solutions - Intelligent People
    dedicated servers, collocation, shared and reseller hosting, managed solutions and background services.

  6. #6
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Roberto,

    try editing your httpd.conf file and placing your "static" subdomain test.hiphoprappers.com VirtualHost container before your wildard ServerAlias VirtualHost container and then reload Apache. In theory, Apache should then match on the configured subdomain before hitting the main domains ServerAlias.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  7. #7
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Wildcard Virtual-Host entry is not required for wildcard dns to function. We have this setup for a few sites and do not use any entry in httpd for the wildcard. You're just creating an admistration nightmare for yourself, as anytime an entry is added to httpd.conf you'll need to manually move it ahead of the wildcard as stated earlier.
    Regards,
    David
    Forum Moderator

  8. #8
    Member phpman's Avatar
    Join Date
    Sep 2003
    Location
    Rio de Janeiro - Brazil
    Posts
    50

    Default

    Important: The change done in <VirtualHost $ip> IS NOT IMPORTANT, SCRIPT WORKS PERFECTLY WITHOUT HER.


    Flávio Pedro
    Intellinoc Specialists
    ---
    Software installation, 24/7 server management,and security.
    hardening Red Hat Certified Engineer | Certified Information Security Systems Professional

    ---
    Intelligent Solutions - Intelligent People
    dedicated servers, collocation, shared and reseller hosting, managed solutions and background services.

  9. #9
    Member
    Join Date
    Jul 2003
    Posts
    36

    Default

    Originally posted by phpman
    Important: The change done in <VirtualHost $ip> IS NOT IMPORTANT, SCRIPT WORKS PERFECTLY WITHOUT HER.


    No, I did not change that. It still is not working. I have a subdomain, studio.hiphoprappers.com and it shoudl forward to hiphoprappers.com/studio but this is not working because it gets forwarded to hiphoprappers.com liek any other non-existant subdomain.
    Last edited by Roberto; 04-16-2004 at 09:51 PM.

  10. #10
    Member
    Join Date
    Sep 2001
    Location
    Spain
    Posts
    779

    Default

    chattr +i /scripts/wwwacct
    Better don't do that or you'll possibly have all kinds of problems. If you want to edit the DNS zone that wwwacct creates I suggest editing the DNS zone templates from WHM.

  11. #11
    Registered User
    Join Date
    Mar 2005
    Posts
    1

    Default

    Quote Originally Posted by dgbaker
    Wildcard Virtual-Host entry is not required for wildcard dns to function. We have this setup for a few sites and do not use any entry in httpd for the wildcard. You're just creating an admistration nightmare for yourself, as anytime an entry is added to httpd.conf you'll need to manually move it ahead of the wildcard as stated earlier.
    Hi dgbaker,

    Can you please tell us how you've set this up without the "httpd.conf" change (it is indeed an admistration nightmare ).

    Regards,
    Robert

  12. #12
    Member isputra's Avatar
    Join Date
    May 2003
    Location
    Mbelitar
    Posts
    593

    Default

    Quote Originally Posted by dgbaker
    Wildcard Virtual-Host entry is not required for wildcard dns to function. We have this setup for a few sites and do not use any entry in httpd for the wildcard. You're just creating an admistration nightmare for yourself, as anytime an entry is added to httpd.conf you'll need to manually move it ahead of the wildcard as stated earlier.

    dgbaker, please tell me how to do it because i need your solution too
    It's me ...... It's me ......

  13. #13
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    It depends on what you are trying to achieve. If you trying to get anything@domain.com to go to your site then the httpd.conf change is required. If though you are doing it so that newly created sub-domains resolve faster then all you need is the DNS wildcard.
    Regards,
    David
    Forum Moderator

  14. #14
    Member isputra's Avatar
    Join Date
    May 2003
    Location
    Mbelitar
    Posts
    593

    Default

    Quote Originally Posted by dgbaker
    It depends on what you are trying to achieve. If you trying to get anything@domain.com to go to your site then the httpd.conf change is required. If though you are doing it so that newly created sub-domains resolve faster then all you need is the DNS wildcard.
    Say, if i need this wildcard dns thing for my url redirection script so i can use it for anything.domain.com to redirect to anotherserver.com

    How about that ? Can i have wildcard dns without editing the httpd.conf ?
    It's me ...... It's me ......

  15. #15
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Not that I know of. One trick to try is to add the *.domain.com to the ServerAlias line of the virtualhost entry you want them directed to. (I have not tried that yet though).
    Regards,
    David
    Forum Moderator

Similar Threads & Tags
Similar threads

  1. DNS wildcard for all sites
    By comeran in forum New User Questions
    Replies: 6
    Last Post: 11-26-2008, 03:42 PM
  2. DNS Wildcard?
    By Millar in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 02-21-2008, 04:05 PM
  3. Wildcard DNS ?
    By lgabi in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-05-2007, 10:04 PM
  4. Wildcard DNS?
    By Omar in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 12-29-2003, 07:30 AM
  5. DNS Wildcard
    By Steven_K in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-24-2003, 11:24 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube