Re: bind server problem



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
.



Relevant Pages

  • Re: [SLE] Hosting my webpage
    ... Chaitanya Krishna A wrote: ... you need to set up some sort of web server. ... Look in the configuration files for where the ... Do you want to host this for your own ...
    (SuSE)
  • Re: dhcpd tftp boot server configuration
    ... dhcpd tftp boot server configuration ... # host statements. ...
    (Debian-User)
  • Re: New install -- MTA mail needs to be reconfigured
    ... the video and sound work ... A smart host is a mail server that relays mail for you. ... you need to tweak Exim's configuration by hand. ...
    (Debian-User)
  • Re: domain name
    ... I never had a problem with the hostname. ... troubles when the host is a server on the 'Net with a static IP and ... Seems to me it should return "localhost" in that case, ... configuration internally consistent with a private configuration in ...
    (Debian-User)
  • SSH filter transer, was Re: Soft Update - directory/file listing
    ... But SSH file transfer is painfully slow all the time. ... ## SSH 3.2 Server Configuration File ... # Note that forwardings using the name of this host will be allowed (if ...
    (freebsd-performance)