
07-12-2010, 12:18 AM
|
|
Newbie
|
|
Join Date: May 2009
Posts: 27
|
|
Adding another domain via bind
How would I add example2.com to my current setup?
example.com.db:
Code:
$TTL 14400
@ 86400 IN SOA ns1.example.com. admin.example.com. (
20100215021 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds
example.com. 86400 IN NS ns1.example.com.
example.com. 86400 IN NS ns2.example.com.
ns1 IN A XXX.XXX.XXX.1
ns2 IN A XXX.XXX.XXX.2
example.com. IN A XXX.XXX.XXX.1
localhost.example.com. IN A 127.0.0.1
example.com. IN MX 0 example.com.
mail IN CNAME example.com.
www IN CNAME example.com.
ftp IN A XXX.XXX.XXX.1
named.config:
Code:
include "/etc/rndc.key";
controls {
inet 127.0.0.1 allow { localhost; } keys { "rndckey"; };
};
options {
allow-transfer { 127.0.0.1; };
allow-recursion { 127.0.0.1; };
directory "/var/named";
pid-file "/var/run/named/named.pid";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
// query-source address * port 53;
};
//
// a caching only nameserver config
//
zone "." IN {
type hint;
file "/var/named/named.ca";
};
zone "localdomain" IN {
type master;
file "/var/named/localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "/var/named/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "/var/named/named.local";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "/var/named/named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "/var/named/named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "/var/named/named.zero";
allow-update { none; };
};
zone "example.com" IN {
type master;
file "/etc/example.com.db";
allow-update { none; };
};
|

07-12-2010, 04:06 AM
|
|
Aspiring Evangelist
|
|
Join Date: Sep 2009
Posts: 414
|
|
You should have a Zone definition:
zone "example.com" IN {
type master;
file "/etc/example.com.db";
allow-update { none; };
};
Which you already have.
Than you have to reload it by the following command:
rndc reload example.com
Or
restart BIND server.
|

07-13-2010, 08:58 AM
|
|
Newbie
|
|
Join Date: Aug 2007
Posts: 20
|
|
Quote:
Originally Posted by cloudvps
You should have a Zone definition:
zone "example.com" IN {
type master;
file "/etc/example.com.db";
allow-update { none; };
};
Which you already have.
Than you have to reload it by the following command:
rndc reload example.com
Or
restart BIND server.
|
nah I meant I have two domains. consolediscussions.com and tru-movement.com
I thought I set up the configuration correctly, but it doesn't show either site when I restart the server.
named.config:
Code:
include "/etc/rndc.key";
controls {
inet 127.0.0.1 allow { localhost; } keys { "rndckey"; };
};
options {
allow-transfer { 127.0.0.1; };
allow-recursion { 127.0.0.1; };
directory "/var/named";
pid-file "/var/run/named/named.pid";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
// query-source address * port 53;
};
//
// a caching only nameserver config
//
zone "." IN {
type hint;
file "/var/named/named.ca";
};
zone "localdomain" IN {
type master;
file "/var/named/localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "/var/named/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "/var/named/named.local";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "/var/named/named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "/var/named/named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "/var/named/named.zero";
allow-update { none; };
};
zone "consolediscussions.com" IN {
type master;
file "/etc/consolediscussions.com.db";
allow-update { none; };
};
zone "tru-movement.com" IN {
type master;
file "/etc/tru-movement.com.db";
allow-update { none; };
};
httpd.config:
Code:
NameVirtualHost XXX.XXX.XXX.X1
NameVirtualHost XXX.XXX.XXX.X2
<VirtualHost XXX.XXX.XXX.X1 XXX.XXX.XXX.X2>
DocumentRoot /var/www/html
ServerName www.consolediscussions.com
ServerAlias consolediscussions
</VirtualHost>
<VirtualHost XXX.XXX.XXX.X1 XXX.XXX.XXX.X2>
DocumentRoot /var/www/html/tme
ServerName www.tru-movement.com
ServerAlias tru-movement
</VirtualHost>
|

07-13-2010, 10:03 AM
|
|
Aspiring Evangelist
|
|
Join Date: Sep 2009
Posts: 414
|
|
What is the output of these commands:
1. dig @YourDNSServer_IP www.consolediscussions.com
2. dig www.consolediscussions.com
Is there any error messages in your DNS server syslog (/var/log/syslog or /var/log/messages)
|

07-14-2010, 12:33 AM
|
|
Newbie
|
|
Join Date: Aug 2007
Posts: 20
|
|
Ok everything is now working, except for now tru-movement.com displays consolediscussions.com homepage.
I have it linked to the right directory though:
NameVirtualHost XXX.XXX.XXX.X1
NameVirtualHost XXX.XXX.XXX.X2
<VirtualHost XXX.XXX.XXX.X1 XXX.XXX.XXX.X2>
DocumentRoot /var/www/html
ServerName www.consolediscussions.com
ServerAlias consolediscussions
</VirtualHost>
<VirtualHost XXX.XXX.XXX.X1 XXX.XXX.XXX.X2>
DocumentRoot /var/www/html/tme
ServerName www.tru-movement.com
ServerAlias tru-movement
</VirtualHost>
|

07-14-2010, 01:31 AM
|
|
Web Hosting Master
|
|
Join Date: Mar 2009
Posts: 968
|
|
Try this. This might work
Quote:
NameVirtualHost XXX.XXX.XXX.X1:80
NameVirtualHost XXX.XXX.XXX.X2:80
<VirtualHost XXX.XXX.XXX.X1 XXX.XXX.XXX.X2>
DocumentRoot /var/www/html
ServerName www.consolediscussions.com
ServerAlias consolediscussions
</VirtualHost>
<VirtualHost XXX.XXX.XXX.X1 XXX.XXX.XXX.X2>
DocumentRoot /var/www/html/tme
ServerName www.tru-movement.com
ServerAlias tru-movement
</VirtualHost>
|
|

07-14-2010, 07:12 PM
|
|
Newbie
|
|
Join Date: Aug 2007
Posts: 20
|
|
Is all you did is add port 80? Cause if so, its still doing the same thing and yes I did restart httpd and named.
|

07-15-2010, 11:26 PM
|
|
Newbie
|
|
Join Date: Aug 2007
Posts: 20
|
|
|

07-16-2010, 06:15 AM
|
|
[ VPS Enthusiast ]
|
|
Join Date: Nov 2009
Location: Cheltenham, UK
Posts: 1,323
|
|
If you can not cope with server administration tasks, then either change to a managed provider, or hire a server management company.
If you are looking for a server management company I would recommend cliffsupport.com, a company I previously worked for used them regularly and they were always good.
__________________
█ Ben Thomas, Director - BTCentral Web Development Services
█ http://www.btcentral.org.uk - Need a custom Web App? Visit us online.
|

07-30-2010, 03:11 PM
|
|
Newbie
|
|
Join Date: Aug 2007
Posts: 20
|
|
For something this simple I don't want to pay someone a $100 an hour to fix. Ive been through that bull and I won't do it again.
So if anyone else has any other ideas I would appreciate them.
|

07-30-2010, 03:31 PM
|
|
Newbie
|
|
Join Date: Aug 2007
Posts: 20
|
|
NVM, it was a simple mistake that apparently I would have ended up paying $100 an hour for nothing. Ben you give crappy advice just so you know. This forum is for helping, you would have just made me waste $75-$100. Thanks for the help, but I figured it out on my own. For those of you with the same problem, chances are you are running a newer apache and the way IPs are stored has changed. Change all of your <VirtualHost> lines to <VirtualHost *:80> and NameVirtualHost to NameVirtualHost *:80
|

07-30-2010, 04:35 PM
|
|
[ VPS Enthusiast ]
|
|
Join Date: Nov 2009
Location: Cheltenham, UK
Posts: 1,323
|
|
Quote:
Originally Posted by IFeelYourPain
NVM, it was a simple mistake that apparently I would have ended up paying $100 an hour for nothing. Ben you give crappy advice just so you know. This forum is for helping, you would have just made me waste $75-$100. Thanks for the help, but I figured it out on my own.
|
Considering they harden/secure, servers for less than $50, there is no way you would have ended paying $75-100 for a simple fix such as the one you stated.
Also, would you like to point out the banner that states WHT is for free technical support?
Sure there is plenty of useful help and advice available here, and the community is generally fairly helpful when they can be, but this is not a tech support forum.
Just because I did not fix your problem does not mean I give out "crappy advice", you'll actually find I give out useful advice a lot around here, just a few examples over the last week or so:
http://www.webhostingtalk.com/showthread.php?t=967954
http://www.webhostingtalk.com/showth...21#post6891621
http://www.webhostingtalk.com/showth...10#post6899210
http://www.webhostingtalk.com/showth...23#post6906023
http://www.webhostingtalk.com/showth...36#post6917936
Thanks for the feedback though  and good to see you solved your problem.
__________________
█ Ben Thomas, Director - BTCentral Web Development Services
█ http://www.btcentral.org.uk - Need a custom Web App? Visit us online.
Last edited by BTCentral - Ben; 07-30-2010 at 04:43 PM.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|