Click to See Complete Forum and Search --> : DNS and domain/Subdomain


NegativeZERO
07-27-2002, 09:32 AM
I have my domain and i want to set a sub domain to it. here is my DNS config.



$ttl 38400
forums.ns1-box1.uni.cc. IN SOA ns1-box1.uni.cc. forums.ns1-box1.uni.cc. (
1027644674
10800
3600
604800
38400 )
forums.ns1-box1.uni.cc. IN NS ns1-box1.uni.cc.


here is how I have the subdomain set, just the basic vitural server for now till I get it working.

<VirtualHost forums.ns1-box1.uni.cc:*>
DocumentRoot /var/www/vitural_host/forums.ns1-box1.uni.cc/public_html
ServerName forums.ns1-box1.uni.cc
</VirtualHost>


But after I set the virutal host in my apache server, it sets the http://www.ns1-box1.uni.cc to where it access the sub domain insted of its path.

like ns1-box1.uni.cc is /var/www/html
forums.ns1-box1.uni.cc /var/www/vitural_host/forums.ns1-box1.uni.cc/public_html

Even though I have them set to diffrent directorys, the server stil uses the path f the subdomain for the main domain.

Is there somethig wrong in my DNS config or what?

Thanks
NegativeZERO

NegativeZERO
07-27-2002, 05:11 PM
Well I figured out the problem, it wasnt my dns config. but here is the new one.

$ttl 38400
ns1-box1.uni.cc. IN SOA ns1-box1.uni.cc. admin.ns1-box1.uni.cc. (
1027786896
10800
3600
604800
38400 )
www.ns1-box1.uni.cc. IN NS ns1-box1.uni.cc.
forums.ns1-box1.uni.cc. IN A 209.152.79.212
irc.ns1-box1.uni.cc. IN A 209.152.79.212
dns1.ns1-box1.uni.cc. IN A 209.152.79.212
dns2.ns1-box1.uni.cc. IN A 209.152.79.212
mail.ns1-box1.uni.cc. IN A 209.152.79.212
e3000.ns1-box1.uni.cc. IN A 209.152.79.212
www.ns1-box1.uni.cc. IN A 209.152.79.212


The prob was I was tying to access http://www.ns1-box1.uni.cc and I dodent have a vitural server configured just ns1-box1.uni.cc and I added www.ns1-box1.uni.cc to a vitural server and it brought it up just fine and now the ns1-box1.uni.cc works after I configured it better.

SuperHornet
07-29-2002, 10:30 PM
FYI.

The correct way to do what you did is with CNAME.
Your Config should look something like this.

$ttl 38400
ns1-box1.uni.cc. IN SOA ns1-box1.uni.cc. admin.ns1-box1.uni.cc. (
1027786897
10800
3600
604800
38400 )
www.ns1-box.uni.cc IN MX 10 mail.ns1-box1.uni.cc

www.ns1-box1.uni.cc. IN NS www.ns1-box1.uni.cc.
forums.ns1-box1.uni.cc. IN CNAME www.ns1-box1.uni.cc.
irc.ns1-box1.uni.cc. IN CNAME www.ns1-box1.uni.cc.
dns1.ns1-box1.uni.cc. IN CNAME www.ns1-box1.uni.cc.
dns2.ns1-box1.uni.cc. IN CNAME www.ns1-box1.uni.cc.
mail.ns1-box1.uni.cc. IN CNAME www.ns1-box1.uni.cc.
e3000.ns1-box1.uni.cc. IN CNAME www.ns1-box1.uni.cc.

www.ns1-box1.uni.cc. IN A 209.152.79.212


Since all your subdomains are resolving to the same IP

209.152.79.212


You only need to make one domain assign wiht the A record and the rest should use the CNAME to www.ns1-box1.uni.cc.

I would highly suggest using a GUI to setup your DNS.
Less chance for a typo.

Hope this makes sence.
Its been a while since I mannualy type out a DNS record.

NegativeZERO
09-12-2002, 05:00 PM
What tool would you sugest for editing through GUI?


Thanks
NegativeZERO

CLL_Sr
09-14-2002, 08:52 PM
I would not suggest using a Cname for the mail A record. It is not the proper way.
If you can't designate an IP and Name for the mailserver just use the FQDN in your mailserver config files.

(mail.ns1-box1.uni.cc. IN CNAME www.ns1-box1.uni.cc.)