2 Domains loading form the same directory

  • MISC/A++
  • Expert
  • Expert
  • User avatar
  • Posts: 508
  • Loc: UnderGround

Post 3+ Months Ago

I have domain "a" and "b", i would like to configure domain "b" to load the from domain "a" directory, i tried changing the "file statement" in named.conf as follow:

Code: [ Select ]
zone "a.com" {
    type master;
    file "a.com";
    allow-transfer {
        IP;
        common-allow-transfer;
    };
};
zone "b.com" {
    type master;
    file "a.com";
    allow-transfer {
        IP
        common-allow-transfer;
    };
};
  1. zone "a.com" {
  2.     type master;
  3.     file "a.com";
  4.     allow-transfer {
  5.         IP;
  6.         common-allow-transfer;
  7.     };
  8. };
  9. zone "b.com" {
  10.     type master;
  11.     file "a.com";
  12.     allow-transfer {
  13.         IP
  14.         common-allow-transfer;
  15.     };
  16. };


any suggestions?

Thanks in advance.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • X3ndou
  • Proficient
  • Proficient
  • User avatar
  • Posts: 263
  • Loc: New Jersey

Post 3+ Months Ago

Wow, I have no idea what you're talking about. Is that an Apache conf file? I don't recognize the syntax.

More info plox.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

it's a bind file (/etc/named.conf)

I'm not sure I understand what's trying to be done here though, but I'm guessing you want to load a.com domain information for b.com. If this in the case, just assign b.com's file as normal (file "b.com";), then link them on the filesystem:
Code: [ Select ]
ln -s /var/named/chroot/var/named/a.com /var/named/chroot/var/named/b.com

This way, you'll be able to change b.com information later without having to to reconfigure named.
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

you going around it the wrong way.

The zone file converts a domain name to an ip address. it has absolutely nothing to do with which directory the website is contained in.

What you need to do is modify your http servers config. if that is apache then the file is called httpd.conf

You then want to alter the documentroot for each of the domains, you can alter them to point to the same document root

or you can use hardlinks or simply one virtual domain for both domain names, or use a mod_rewrite command

In other words there is a multitude of ways to accomplish it

Chris

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 60 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.