LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-14-2011, 07:38 PM   #1
SentralOrigin
Member
 
Registered: Jul 2005
Distribution: Gentoo, Ubuntu
Posts: 318

Rep: Reputation: 30
Domain DNS zone file settings for home server?


I've bought a domain and am currently trying to configure the zone file so that it'll point to my DynDNS address since I'm hosting a website from home.

I have software on my router set up so that it automatically logs in and updates DynDNS with my public IP address should it ever change.

In my domain manager settings, I've left the DNS servers as the default (with the domain registrar/manager's DNS servers). I'm editing the zone file so if I make a CNAME record for "www" that points to "mydns.dyndns.org." (with the trailing period) is that correct? I'm not sure how long it takes DNS zone settings to propogate but if I try to go to www.mydomain.com, it says no website found as if my site didn't exist. (But if I go to mydns.dyndns.org, it shows my website fine).

Also, I want to set up a forum on a different host, say forum.mydomain.com
And my phpBB forum is in the folder /var/www/htdocs/forum/ (since my website's index.html and everything is in /var/www/htdocs/), is it possible to point forum.mydomain.com to /var/www/htdocs/forum/ ? (Since www.mydomain.com points to the index.html in /var/www/htdocs/ ) I'm using Apache on Linux.
 
Old 10-15-2011, 01:19 AM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
1. you can not 'host' your dynamic dns domain (that's why DynDns is doing it for you)

2. for a subdomain on 'real' host you need to create a DNS entry in your zone ()
Code:
; zone fragment for example.com
; name servers in the same zone
$TTL 2d ; default TTL is 2 days
$ORIGIN example.com.
@              IN      SOA   ns1.example.com. hostmaster.example.com. (
               2003080800 ; serial number
               2h         ; refresh =  2 hours 
               15M        ; update retry = 15 minutes
               3W12h      ; expiry = 3 weeks + 12 hours
               2h20M      ; minimum = 2 hours + 20 minutes
               )
; main domain name servers
              IN      NS     ns1.example.com.
              IN      NS     ns2.example.com.

; A records for name servers above 
ns1           IN      A      192.168.0.3

; subdomains
forum           IN      A      192.168.0.3
this subdomain forum is pointing to the same server IP that hosts 'main' domain example.com

so you need to create Apache HTTPD virtual host for subdomain (vhosts examples):
Code:
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /www/example1
ServerName www.example1.com

# Other directives here

</VirtualHost>

<VirtualHost *:80>
DocumentRoot /www/forum/
ServerName forum.example1.com

# Other directives here

</VirtualHost> 
 
  


Reply



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
Dns Problem Loading The Zone File Error(zone File Not Found) ramineni Linux - Newbie 1 09-14-2008 08:36 AM
Zone file(s) problem, datestamps keep updating on secondary DNS server. ipa Linux - Newbie 1 08-05-2008 10:58 AM
Configure DNS zone file for MX records outside of domain cowanrl Linux - Networking 2 10-30-2006 07:23 AM
Cache DNS server and zone file DanielTan Linux - Networking 7 09-26-2005 11:00 AM
DNS Zone file config for mail server viniosity Linux - Software 4 09-16-2003 03:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:35 AM.

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