BIND

Soldato
Joined
18 May 2010
Posts
22,376
Location
London
Been trying to do this for most of the day. I managed to get a WordPress website working at work a few months back, involving bind and SSL but trying to get this done at home is proving to be a bit tough.

So far, I've install, MySQL and Apache on Centos 6.8 and have managed to get a WordPress website up.

Three things I want to do.

1. Get the website to respond to andrew.com rather than IP.
2. Set up SSL.
3. Set up a 2nd site on the same Apache server.

I first started on the SSL task, but then decided to switch to installing bind and getting that working.

My set up is simple.

In my /etc/named.conf file I added:

zone "andrew.com" IN {
type master;
file "andrew.com.zone";
allow-update { none; };
};

zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.arpa.zone";
};

But now I am struggling with the zone file

I created a andrew.com.zone file but confused what values to put.

The DNS/apache server has an IP of 192.168.1.231


----

Actually this is all in preparation for an interview happening early next week.
 
Last edited:
Soldato
Joined
21 Jun 2004
Posts
2,789
Location
Berkshire
In andrew.com.zone you are going to need an A record pointing to the IP address of your webserver and a CNAME for www if you want www.andrew.com to work, but before that you are going to need a SOA, default TTL and serial number.

Have a look in /usr/share/doc/bind*, usually there will be a sample zone file along with the documentation which you can refer to.

Heres one:

Code:
$TTL 3H
@	IN SOA	@ admin.domain.com. (
					20161105	; serial
					1D	; refresh
					1H	; retry
					1W	; expire
					3H )	; minimum
		NS	@
		A	192.168.1.1
www		CNAME domain.com.
 
Last edited:
Back
Top Bottom