hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : VPS Hosting : Adding another domain via bind
Reply

VPS Hosting Virtual private server discussion and vps hosting solutions. Review VPS hosting providers and offer advice on virtual web hosting solutions. If your service is unavailable, please click here.
Forum Jump

Adding another domain via bind

Reply Post New Thread In VPS Hosting Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 07-12-2010, 12:18 AM
IFeelUrPain IFeelUrPain is offline
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; };
    };

Reply With Quote


Sponsored Links
  #2  
Old 07-12-2010, 04:06 AM
cloudvps cloudvps is offline
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.

__________________
CloudVPS
Affordable VPS Servers - Middle East
High performance | Green technologies

Reply With Quote
  #3  
Old 07-13-2010, 08:58 AM
IFeelYourPain IFeelYourPain is offline
Newbie
 
Join Date: Aug 2007
Posts: 20
Quote:
Originally Posted by cloudvps View Post
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>

Reply With Quote
Sponsored Links
  #4  
Old 07-13-2010, 10:03 AM
cloudvps cloudvps is offline
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)

__________________
CloudVPS
Affordable VPS Servers - Middle East
High performance | Green technologies

Reply With Quote
  #5  
Old 07-14-2010, 12:33 AM
IFeelYourPain IFeelYourPain is offline
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>

Reply With Quote
  #6  
Old 07-14-2010, 01:31 AM
VIPoint VIPoint is offline
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>

__________________
*Honest & Advanced Outsourced Support*
Dedicated Linux Server Admins in Infopark Tech Park, India
VIPoint Pvt. Ltd | http://www.vipointsolutions.com
E-Mail: Sales@VIPointSolutions.com

Reply With Quote
  #7  
Old 07-14-2010, 07:12 PM
IFeelYourPain IFeelYourPain is offline
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.

Reply With Quote
  #8  
Old 07-15-2010, 11:26 PM
IFeelYourPain IFeelYourPain is offline
Newbie
 
Join Date: Aug 2007
Posts: 20
help plz????

Reply With Quote
  #9  
Old 07-16-2010, 06:15 AM
BTCentral - Ben BTCentral - Ben is offline
[ 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.

Reply With Quote
  #10  
Old 07-30-2010, 03:11 PM
IFeelYourPain IFeelYourPain is offline
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.

Reply With Quote
  #11  
Old 07-30-2010, 03:31 PM
IFeelYourPain IFeelYourPain is offline
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

Reply With Quote
  #12  
Old 07-30-2010, 04:35 PM
BTCentral - Ben BTCentral - Ben is offline
[ VPS Enthusiast ]
 
Join Date: Nov 2009
Location: Cheltenham, UK
Posts: 1,323
Quote:
Originally Posted by IFeelYourPain View Post
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.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Seeking tips on adding Microsoft SRV records to BIND/DNS on Linux pmabraham Hosting Security and Technology 0 09-03-2009 09:00 AM
How to bind a sub-domain? clster Hosting Security and Technology 4 10-24-2004 05:46 AM
ø in domain. How to handle in Bind? MattF Hosting Security and Technology 2 03-23-2004 03:05 AM
adding to bind dialuphost Hosting Security and Technology 0 08-31-2002 03:35 PM
How to Bind my Domain to IP arvage Hosting Security and Technology 7 06-19-2001 01:54 AM

Related posts from TheWhir.com
Title Type Date Posted
Domain Marketplace Sedo, Web Host Go Daddy Extend Partnership Web Hosting News 2012-09-26 14:42:41
Web Hosting Sales and Promos Roundup – August 24, 2012 Web Hosting News 2012-08-24 16:50:42
ICANN Publishes Details on Domain Seizure Process Web Hosting News 2012-03-09 15:38:48
Tucows Adds 100-Plus new Domain Extensions to OpenSRS System Web Hosting News 2011-12-22 18:29:09
Profiting From Domains for Web Hosts, with Christoph Donnemiller of PartnerGate Web Hosting News 2011-10-27 18:52:21


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?