LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-26-2004, 02:12 PM   #1
trees
Member
 
Registered: Dec 2003
Location: Earth... I think!?
Distribution: Debian
Posts: 32

Rep: Reputation: 15
BIND and Apache


Greetings,

I've read through forums and many howto's for a few days now, and still can't figure this out.

I want to set up my own DNS server (BIND) and have Apache run Virtual Hosts.

It loads other pages, so bind seems to be working fine as a DNS to other pages, but when I put in "kfaserver2.net", it waits for a while and then gives me an "Unknown Host" error.

Here are the config files:
ns1.kfaserver1.net
---named.conf.local-----------------------------------------------
zone "kfaserver2.net" {
type master;
file "/etc/bind/zones/kfaserver2.net"
};

---zones/kfaserver2.net-----------------------------------------
$TTL 3600
@ IN SOA ns1.kfaserver1.net. root.localhost. (
2 ; serial
10800 ; refresh
3600 ; retry
3600000 ; expire
86400 ) ; minimum

IN NS ns1.kfaserver1.net.

---apache/httpd.conf--------------------------------------------------------
NameVirtualHost *

<VirtualHost *>
ServerName kfaserver1.net
DocumentRoot /var/www/kfaserver1/
</VirtualHost>

<VirtualHost *>
ServerName ns1.kfaserver1.net
DocumentRoot /var/www/ns1/
</VirtualHost>

<VirtualHost *>
ServerName kfaserver2.net
DocumentRoot /var/www/kfaserver2/
</VirtualHost>

---/etc/resolv.conf-------------------------------------------------------------
nameserver 127.0.0.1

------------------------------------------------------------------------------------

I think it has something to do with bind, because the error doesn't seem to be coming from apache.

Thanks.
 
Old 07-26-2004, 03:01 PM   #2
Linux_in_NH
Member
 
Registered: Jan 2004
Location: NH
Distribution: Mandrake, Geentoo, Ubuntu
Posts: 105

Rep: Reputation: 15
One that that I can see right away is that in the zone file, you do not define any address ('A') records, only a NS record

Try adding an 'A' record and see what happens (don't forget to bump the serial #)
 
Old 07-26-2004, 03:12 PM   #3
trees
Member
 
Registered: Dec 2003
Location: Earth... I think!?
Distribution: Debian
Posts: 32

Original Poster
Rep: Reputation: 15
OK
Here's what the file looks like now.
---zones/kfaserver2.net--------------------------------------------
$TTL 3600
@ IN SOA ns1.kfaserver1.net. root.localhost. (
4 ; serial
10800 ; refresh
3600 ; retry
3600000 ; expire
86400 ) ; minimum

IN NS ns1.kfaserver1.net.
IN A 67.116.162.14
-------------------------------------------------------------------
root@xyz:# named-checkzone kfaserver2.net kfaserver2.net
zone kfaserver2.net/IN: loaded serial 4
OK

It still gives the same error message (after trying for quite a time): Unknown Host: kfaserver2.net
 
Old 07-26-2004, 05:30 PM   #4
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
I would first check the bind log file to see if that gives any clues, or errors. Are you doing a nslookup when it is giving the unknown host error? If you are make sure you are checking DNS on the server itself.


$ nslookup

> server ip.addres.of.server

> kfaserver2.net
 
Old 07-27-2004, 11:12 AM   #5
trees
Member
 
Registered: Dec 2003
Location: Earth... I think!?
Distribution: Debian
Posts: 32

Original Poster
Rep: Reputation: 15
Now everything works. Can't believe I missed this.

I tried to use wajig to start/stop bind while named was running from the time of installation, so the changes I made never took place because it never restarted.

Many thanks for your help
 
  


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
Apache bind error Fordor Linux - Networking 2 04-23-2005 10:43 AM
Partioning for Bind and Apache fail66 Debian 0 12-13-2004 03:36 PM
Redhat 7.3, Apache, and Bind arikel Linux - Networking 6 04-01-2003 04:13 AM
bind and apache ethanchic Linux From Scratch 2 08-15-2002 01:11 AM
Bind 8 Apache justlinux Linux - Networking 11 07-21-2001 04:38 PM

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

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