Nameserver setup - Apache2 on freebsd 7

jdistad
jdistad used Ask the Experts™
on
I have been reading around here looking for answers (new user here) and I see so much flaming that I am almost scared to ask this question, but here goes anyhow lol..

I have a few dedicated boxes that are running on freebsd with apache. I am on the "learning path" but need a bit of guidance to get from point b (where I am now) to point z (where everything is working correctly)

I will start off by telling you where I am, what I have done and hopefully someone can fill in the blanks and steer me in the right direction.

1. I installed apache2, mysql, php and phpmyadmin.
2. I edited hosts.allow to give me access to things like ftpd
3. I edited httpd.conf
4. I edited /etc/namedb/named.conf and added the zone file info for the domain
5. I created a zone file in /etc/namedb/master/
6. I edited resolv.conf and added the domain (whereitshosted.com) and a line that says nameserver 127.0.0.1

at this point, the site is serving by ip but the domain is not resolving for the domain name. i have also run checks on pingability.com and get errors and warnings. (quite obvious I don't have the dns set correctly)

I know I am close, but I also know when I have no idea what I am looking for. I have read references to reverse and forward dns but I have no idea what files to edit or where they are located.

If someone could please give me a quick list of all files that need to be edited or created in order to properly setup and configure the nameserver on these boxes and the locations of these files I would greatly appreciate it. I don't really need a pile of garbled jargon as I do have 4 other fully setup servers that I can look at to see what is needed in each file.

Thanks for your time and consideration.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
President
Commented:
Hi,

First of all:
- You say you've edited the resolv.conf. Is this resolv.conf over the same system as your DNS server ?

the correct syntax for the resolv.conf is:
search domain.com
nameserver ip.addr.of.dns.server

Plese change.

Now you must be able to resolve your domain. isue this command:

nslookup www.domain.com

if it does not work try

nslookup www.ibm.com

If it can not resolv your domain it measn that there's an erro in your configuration. You must see it in your system logs. Please check them.

 Ifeverything is OK you should see something like that:

Jul 19 04:07:37 yourhost named[4335]: starting BIND 9.3.4-P1 -u named -t /var/named/chroot
Jul 19 04:07:37 yourhost named[4335]: found 2 CPUs, using 2 worker threads
Jul 19 04:07:37 yourhost named[4335]: loading configuration from '/etc/named.conf'
Jul 19 04:07:37 yourhost named[4335]: listening on IPv4 interface lo, 127.0.0.1#53
Jul 19 04:07:37 yourhost named[4335]: listening on IPv4 interface eth0, 10.0.0.9#53
Jul 19 04:07:37 yourhost named[4335]: command channel listening on 127.0.0.1#953
Jul 19 04:07:37 yourhost named[4335]: command channel listening on ::1#953
Jul 19 04:07:37 yourhost named[4335]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997032801
Jul 19 04:07:37 yourhost named[4335]: zone yourdomain.com/IN: loaded serial 2009071901

Open in new window

Kerem ERSOYPresident

Commented:
If you still cannot get it run post your named.conf and zone file here
Kerem ERSOYPresident

Commented:
When it comes to files you need to edit:

- named.conf
- your zone file
- resolve.conf
- your reverse zone file (if any)

Commented:
Correct me if I'm wrong since I'm not an expert in freebsd, but I wonder if you've already setup DNS for your domain??? If not, your domain never tie up to your IP and that's reason why when typing your domain in browser, you never get the webpages hosting on your freebsd, but you can see them when access by IP

If you have no clue how to setup DNS, check this guide to get the idea
http://blog.jlbn.net/?p=28

Author

Commented:
Good information, and I was off there a bit so I have selected this as the solution. My problem actually was mainly in my virtual hosts file. I had a line to a log file that didn't exist that was preventing apache from starting :-) so were all good now, thanks again.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial