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 05-28-2012, 02:17 PM   #1
cryingthug
Member
 
Registered: Jun 2009
Posts: 131

Rep: Reputation: 18
Cannot get to website using domain name


I cannot see to get to my site by domain name. I can get to it by IP address fine. I am guessing that the problem is with the Bind configuration file... or maybe Apache?

This works:
Code:
$ dig @dnsserver linuxquestions.org
Which means that DNS is working.
When I type in the browser the IP this works:
Code:
http://192.168.69.221/a_test_website
But this does not work:
Code:
http://mytestwebsite.com
Here is the db.atestsite.com file.
Code:
; BIND data file for mytestsite.    
;                       
$ORIGIN dynamicdnsname.here.com 
$TTL        604800      
;Name of the primary ns and the email of the administrator.
@           IN  SOA ns.mytestsite.com. admin.mytestsite.com. (
             2012052806 ;Serial                                                       
             604800      ; Refresh
             86400       ; Retry 
            2419200     ; Expire
            604800 )    ; Negative Cache TTL
;                       
;Tells dns servers on the Internet the primary ns server that have authorit    y
             IN  NS  ns.mytestsite.com.

;Anchor records that point to your domain.
;The address localhost.mytestsite.com can only be accessed by the server itself.
localhost   IN  A       127.0.0.1

;The domain name. The number should be the Public IP address. 
;This is the address they ping or browse to http://mytestsite.com.
mytestsite.com. IN  A       201.133.69.25

;Pinging ns.mytestsite.com. would return the public IP address.
ns          IN  A       192.168.69.221

;Browsing www.mytestsite.com. would take the viewer to the site.
www         IN  A       192.168.69.221

;Makes http://www.mytestsite.com. the same as http://forum.mytestsite.com.
forum       IN  CNAME   www
 
Old 05-28-2012, 02:19 PM   #2
cryingthug
Member
 
Registered: Jun 2009
Posts: 131

Original Poster
Rep: Reputation: 18
Oh, btw, I am using Debian 6 and Apache2 Bind9.
 
Old 05-28-2012, 03:47 PM   #3
nibraz
Member
 
Registered: Oct 2008
Posts: 219

Rep: Reputation: 18
I had the same issue.. make sure your router is port forwarding 80 and 53. Here is how my zone file looks, and it works perfectly.

Code:
$TTL        3600
@       IN      SOA     ns1.mydomain.com. my.email.com. (
                        2012041603       ; serial, todays date + todays serial #
                        7200              ; refresh, seconds
                        540              ; retry, seconds
                        604800              ; expire, seconds
                        86400 )            ; minimum, seconds
;

mail           3600      A       		  81.xxx.xxx.xxx
mydomain.com. 3600      A         	          81.xxx.xxx.xxx
mydomain.com. 3600      MX    10                 mail.mydomain.com
mydomain.com. 3600      NS                       ns1.mydomain.com
mydomain.com. 3600      NS                       ns2.mydomain.com
www 	       3600      A        		  81.xxx.xxx.xxx
ns1.mydomain.com. IN A 81.xxx.xxx.xxx
ns2.mydomain.com. IN A 81.xxx.xxx.xxx
 
1 members found this post helpful.
Old 01-14-2013, 06:20 AM   #4
cryingthug
Member
 
Registered: Jun 2009
Posts: 131

Original Poster
Rep: Reputation: 18
working!

Forwarding the port worked. However I am getting the domain name of the router appended to the nslookup query.

domain name = adomain.tt.net
router's domain name = extradomain.com

Look at the output under Non-authoritative answer.

Code:
C:\Documents and Settings\johnny>nslookup xyz.us.to
*** Can't find server name for address 192.168.X.X: Non-existent domain
*** Default servers are not available
Server:  UnKnown
Address:  192.168.X.X

Non-authoritative answer:
Name:    adomain.tt.net.extradomain.com
Address:  32.21.165.32
 
Old 01-23-2013, 08:23 PM   #5
cryingthug
Member
 
Registered: Jun 2009
Posts: 131

Original Poster
Rep: Reputation: 18
3600

nibraz:

Why did you write 3600 in the second column? I have never seen that before.

Code:
mail           3600      A       		  81.xxx.xxx.xxx
mydomain.com. 3600      A         	          81.xxx.xxx.xxx
mydomain.com. 3600      MX    10                 mail.mydomain.com
mydomain.com. 3600      NS                       ns1.mydomain.com
mydomain.com. 3600      NS                       ns2.mydomain.com
www 	       3600      A        		  81.xxx.xxx.xxx
 
Old 01-24-2013, 09:40 PM   #6
m1rr0rm3
LQ Newbie
 
Registered: Jan 2013
Location: Planet Earth
Distribution: RHEL v7.6
Posts: 28

Rep: Reputation: Disabled
Hi,

Are you using Cpanel or PLESK?

;Browsing www.mytestsite.com. would take the viewer to the site.
www IN A 192.168.69.221

The answer is actually pretty simple. If you change, in your dns.conf file the POINTER from
www IN A 192.168.69.221

to

mytestsite.com IN A 192.168.69.221

It should work
 
Old 01-24-2013, 10:42 PM   #7
linuxmania.info
LQ Newbie
 
Registered: Jan 2013
Posts: 4

Rep: Reputation: Disabled
Hello, Please check with this.

Hi ,

First of all , You can check your website is working from local environment.

you can check through /etc/hosts entry....

/etc/hosts
IP domainname

192.168.*.* example.org
 
  


Reply

Tags
bind, dns



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
implementing new domain on website sunlinux Linux - Server 3 04-21-2008 05:49 AM
Do I Need To Take My Firewall Of To Run My Domain Website? dominic95 General 2 01-01-2007 03:49 PM
adding 2nd domain or website spooge Linux - Networking 1 02-26-2004 08:59 AM
Using a domain name instead of ip address for my website??? oulevon General 9 08-10-2001 04:22 PM

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

All times are GMT -5. The time now is 07:57 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