DuncanMcLord

Active Member
Dec 12, 2001
31
0
306
hi there,

i had several problems, when i tried to add subdomain support via WHM and CPanel on my server.
I managed to solve em and track em down until to the final problem:
If i create a new subdomain by using CPanel, it says \"ndc: could not get key definition. check resolve.conf...\" BUT if i check the DNS file of that domain, the new subdomain has been added, but with a wrong IP address.
Heres an example:
Lets say i have mclord.com and want to add \"duncan\"-subdomain, then CPanel would do the following to \"duncan.com.db\" file:

duncan.com. 14400 IN NS ns1.provider.com.
duncan.com. 14400 IN NS ns2.provider.com.
duncan.com. 14400 IN A 111.222.333.444

duncan 14400 IN A 111.222.333.444

but shouldnt \"duncan\"-subdomain look like this?:

duncan 14400 IN A 111.222.333.xxx
where \"xxx\" is not equal to \"444\"!
...cause else it would point to the same IP address, as \"www.mclord.com\".

so long,

Duncan McLord
 

moronhead

Well-Known Member
Aug 12, 2001
706
0
316
[quote:fd05e3ad28] duncan.com. 14400 IN NS ns1.provider.com.
duncan.com. 14400 IN NS ns2.provider.com.
duncan.com. 14400 IN A 111.222.333.444

duncan 14400 IN A 111.222.333.444
[/quote:fd05e3ad28]You probably meant mclord.com on the first 3 lines. ;)


[quote:fd05e3ad28]...cause else it would point to the same IP address, as \"www.mclord.com\".
[/quote:fd05e3ad28]That\'s exactly what it does: Cpanel points the subdomain to the same IP address as the main domain.

If your main domain is on a unique IP number and you wanted it to remain that way you would need to change the IP address for the subdomain manually in both the DNS file and the VirtualHost section of httpd.conf for that subdomain.
 

DuncanMcLord

Active Member
Dec 12, 2001
31
0
306
[quote:cfcdf31803]You probably meant mclord.com on the first 3 lines. ;)[/quote:cfcdf31803]

DOH! ...true... :)

[quote:cfcdf31803]That\'s exactly what it does: Cpanel points the subdomain to the same IP address as the main domain.

If your main domain is on a unique IP number and you wanted it to remain that way you would need to change the IP address for the subdomain manually in both the DNS file and the VirtualHost section of httpd.conf for that subdomain. [/quote:cfcdf31803]

oh, i didnt know, that thx a lot...
so far i allways saw subdomains pointin to different IPs...
so i will have to check, why CPanel makes an error message, when i add a subdomain, cause everything is added in the necessary files...

so long,

Duncan McLord

PS: ...i just found out, that ndc seems to be the problem.
named works fine, but ndc allways reports that \"key definiton\" was not found.

[Edited on 12/25/01 by DuncanMcLord]
 

DuncanMcLord

Active Member
Dec 12, 2001
31
0
306
hi there,

i finally made it... at least CPanel is workin and ndc (rndc) as well, but now i get this error message:

\"ndc: reload command successful duncan.mclord.com could not be modified because it does not resolve to a valid ip address.\"

what does this mean?
...is this where i have to \"edit(ing) manually\"?
...i mean, where is the problem here:
first CPanel calls \"ndc\" which runs fine, but then s.th. else gets started, which makes this error message (nslookup, or s.th. like that?)...
...but so far i am more than glad, that it finally runs (nearly) perfect :D

so long,

Duncan McLord
 

moronhead

Well-Known Member
Aug 12, 2001
706
0
316
[quote:8d5c8def15]\"ndc: reload command successful duncan.mclord.com could not be modified because it does not resolve to a valid ip address.\" [/quote:8d5c8def15]
If your nameserver lives on the same machine as your web server, make sure /etc/resolv.conf has this on its first line:
[code:1:8d5c8def15]nameserver 127.0.0.1[/code:1:8d5c8def15] ...and retry creating another subdomain to see if gives you the same error.
 

DuncanMcLord

Active Member
Dec 12, 2001
31
0
306
hi there,

thx i finally made it and WHM, CPanel and (r)ndc work just fine :)

...the last problem was based on a misconfigured rndc.conf file... which was quite hard to find (i mean the error) cause it wasnt s.th. really obvious... but made it :)

so long... and thx for the help guys,

Duncan McLord