#1 (permalink)  
Old 04-15-2004, 10:55 PM
Registered User
 
Join Date: Jul 2003
Posts: 36
Roberto
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2004, 03:49 AM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
Quote:
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
cPanel Forum Moderator

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-16-2004, 06:59 AM
phpman's Avatar
Registered User
 
Join Date: Sep 2003
Location: Rio de Janeiro - Brazil
Posts: 50
phpman
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
__________________
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.

Last edited by phpman; 04-16-2004 at 07:01 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-16-2004, 07:16 AM
Registered User
 
Join Date: Jul 2003
Posts: 36
Roberto
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-16-2004, 07:28 AM
phpman's Avatar
Registered User
 
Join Date: Sep 2003
Location: Rio de Janeiro - Brazil
Posts: 50
phpman
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-16-2004, 09:01 AM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
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
cPanel Forum Moderator

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-16-2004, 09:14 AM
dgbaker's Avatar
Moderator
Advanced cPanel/WHM User
 
Join Date: Sep 2002
Location: Toronto, Ontario Canada
Posts: 2,768
dgbaker is on a distinguished road
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

Alternate Support? http://www.cpanelhosts.com
Looking for a server? http://www.myvirtualhosting.com
Get Dedicated in Toronto at MVH.
We are a licensed cPanel PartnerNoc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-16-2004, 09:17 AM
phpman's Avatar
Registered User
 
Join Date: Sep 2003
Location: Rio de Janeiro - Brazil
Posts: 50
phpman
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-16-2004, 10:43 PM
Registered User
 
Join Date: Jul 2003
Posts: 36
Roberto
Quote:
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 10:51 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-16-2004, 11:40 PM
Advanced cPanel/WHM User
Advanced cPanel/WHM User
 
Join Date: Sep 2001
Location: Spain
Posts: 779
Juanra is on a distinguished road
Quote:
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 11-28-2005, 06:55 AM
Registered User
 
Join Date: Mar 2005
Posts: 1
Vircon is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 12-13-2005, 01:12 AM
isputra's Avatar
Registered User
 
Join Date: May 2003
Location: Mbelitar
Posts: 592
isputra
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 ......
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 12-13-2005, 12:13 PM
dgbaker's Avatar
Moderator
Advanced cPanel/WHM User
 
Join Date: Sep 2002
Location: Toronto, Ontario Canada
Posts: 2,768
dgbaker is on a distinguished road
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

Alternate Support? http://www.cpanelhosts.com
Looking for a server? http://www.myvirtualhosting.com
Get Dedicated in Toronto at MVH.
We are a licensed cPanel PartnerNoc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 12-13-2005, 12:19 PM
isputra's Avatar
Registered User
 
Join Date: May 2003
Location: Mbelitar
Posts: 592
isputra
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 ......
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 12-13-2005, 12:36 PM
dgbaker's Avatar
Moderator
Advanced cPanel/WHM User
 
Join Date: Sep 2002
Location: Toronto, Ontario Canada
Posts: 2,768
dgbaker is on a distinguished road
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

Alternate Support? http://www.cpanelhosts.com
Looking for a server? http://www.myvirtualhosting.com
Get Dedicated in Toronto at MVH.
We are a licensed cPanel PartnerNoc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:33 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc