Re: bind server problem
- From: Chris Davies <chris-usenet@xxxxxxxxxxxx>
- Date: Thu, 24 May 2012 15:49:23 +0100
Julien Mills <julienfmills@xxxxxxxxx> wrote:
I have a caching bind dns (and dhcpd) server running on a Slackware box.
It works great, almost.
In a browser when I type: www.example.com it works, I get to my website.
If I type example.com (without the www) it does not work.
What do you mean by "it does not work"? There are at least two different
potential issues here.
1. DNS entries: is there a DNS 'A' record for both www.example.com
and example.com, and do both resolve to the same IP address. (This
is what the other posts here seem to be concentrating on.)
2. Web configuration: many websites these days are configured to be
able to run multiple websites from the same IP address. Consequently,
unless you tell the webserver to accept requests for www.example.com
AND example.com, it won't have any content to deliver to you.
You can confirm #1 by running the following commands and visually
confirming that you get the same external address reported for both
questions:
dig +short a www.example.com
dig +short a example.com
You can confirm #2 either by checking the configuration files for your
webserver, or empirically as follows. First, you need to obtain the
correct IP address for your server. In this example I'm going to assume
it's 10.11.12.13:
(a)
nc -vvv 10.11.12.13 80 # "telnet 10.11.12.13 80"
GET / HTTP/1.0
Host: www.example.com
(b)
nc -vvv 10.11.12.13 80
GET / HTTP/1.0
Host: example.com
In both cases you'll need to hit Return a couple of times at the end
(i.e. there needs to be a blank line after the Host: line).
If you get the same content from both requests then your web server is
configured as you hope. If you don't then it isn't.
Chris
.
- Follow-Ups:
- Re: bind server problem
- From: Julien Mills
- Re: bind server problem
- References:
- bind server problem
- From: Julien Mills
- bind server problem
- Prev by Date: Re: bind server problem
- Next by Date: Re: bind server problem
- Previous by thread: Re: bind server problem
- Next by thread: Re: bind server problem
- Index(es):
Relevant Pages
|