LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-10-2005, 07:53 PM   #1
DPenguin
LQ Newbie
 
Registered: Feb 2005
Location: Tucson Arizona
Distribution: fedora core 3 and/or RH enterprise linux 3.0
Posts: 12

Rep: Reputation: 0
Setting up a sub-domain


Hello,

I am running fc3 on a gateway 7200x pc.
I have 1 domain setup on my system, and I want to create some sub-domains to separate my websites logically.

How do I configure my zone file to create the sub-domains?

My zone file looks like:
$ORIGIN .
$TTL 1d
foobar.com IN SOA foobar.com hostmaster.foobar.com. (
2005030301 ; serial
28800 ; refresh (8 hours)
7200 ; retry (2 hours)
3600000 ; expire (5 weeks 6 days 16 hours)
43200 ; minimum (12 hours)
)
NS ns1.foobar.com.
NS ns3.foobar.com.
MX 10 smtp.secureserver.net.
MX 20 mailstore.secureserver.net.
A 10.0.0.1
$ORIGIN foobar.com.
localhost A 127.0.0.1
oasis A 10.0.0.1
smtp A 10.0.0.1
mail A 10.0.0.1
www CNAME oasis.
ftp CNAME oasis.

obviously I have changed the ip address and domain name.

I want to add subdomains of test.foobar.com, and dev.foobar.com.

any suggestions greatly appreciated.
 
Old 03-10-2005, 08:08 PM   #2
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
Let me see if I understand your request:

Do you want to have separate zones that can have their own hosts, like server1.test.foobar.com and server2.test.foobar.com, or do you want to just have a server that is test.foobar.com?

If you just want to have a server called test.foobar.com, then all you need to do is add a CNAME or an A record for the host.
Code:
test.foobar.com.       CNAME        realserver.foobar.com.
dev.foobar.com.         A           192.168.5.5
If you want to have whole sub-zones, then you need to add a new zone in the named.conf file.

Code:
zone "dev.foobar.com" {
       type master;
       file dev;
       };
Then, in the dev file, create the records for server1.dev.foobar.com, etc.

Does this answer your question?

Last edited by shubb; 03-10-2005 at 08:12 PM.
 
Old 03-10-2005, 11:36 PM   #3
DPenguin
LQ Newbie
 
Registered: Feb 2005
Location: Tucson Arizona
Distribution: fedora core 3 and/or RH enterprise linux 3.0
Posts: 12

Original Poster
Rep: Reputation: 0
sub-domains

Shubb,

What I want is to be able to configure my apache server to have virtual hosts of test.foobar.com and dev.foobar.com, and to have the proper dns entries to handle it.

I suspect that the second approach you outlined is what I really want, so I will give it a try.
Thanks
 
Old 03-14-2005, 02:23 PM   #4
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
What you want to do is exactly what I am doing with my server.

If the same web server handles all the different virtual websites, then all you need to do is add the CNAME entry for all the different hosts into the zone file. Each of these points to the hostname that you have the A record for the real server. That is actually the first option I listed.

Code:
server.foobar.com.          A         192.168.1.1
www.foobar.com.             CNAME     server.foobar.com.
dev.foobar.com.             CNAME     server.foobar.com.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up domain name aliases piersk Linux - Networking 1 07-18-2006 11:56 PM
Setting up a domain name... Sanna Linux - Newbie 2 05-02-2004 02:53 PM
setting domain name in redhat dlm4444 Linux - Networking 1 02-28-2004 04:39 AM
Setting up a linux domain? nano_electronix Linux - Networking 2 02-10-2004 07:30 AM
setting up email with new domain name mark_alfred Linux - General 4 12-03-2003 12:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration