Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Sep 06, 2010 3:03 pm 
Offline
Junior Member

Joined: Sat Jul 10, 2010 12:02 am
Posts: 20
I have a whole ton of domains that I'd like to point at a website.

for example, domain xyz.com should end up bringing up website abc.com (with abc.com in the bowser address bar).

I'm using debian/apache2

Now, I could go & make a ton of websites with a redirect on them, but then I'd have to add a ton of sites into sites_available virtual host entries, plus make a bunch of redirects.

Is there an easier way, perhaps with dns?

I'm a bit of a noob here, so syntax would be most helpful.

thanks!


Top
   
 Post subject:
PostPosted: Mon Sep 06, 2010 3:25 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
Use DNS:
Code:
abc.com.   A       12.34.56.78
uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Mon Sep 06, 2010 3:37 pm 
Offline
Junior Member

Joined: Sat Jul 10, 2010 12:02 am
Posts: 20
pclissold wrote:
Use DNS:
Code:
abc.com.   A       12.34.56.78
uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.


perfect. thanks !


Top
   
 Post subject:
PostPosted: Mon Sep 06, 2010 3:38 pm 
Offline
Junior Member

Joined: Sat Jul 10, 2010 12:02 am
Posts: 20
wait - is this in the dns record for abc.com or xyz.com?


Top
   
 Post subject:
PostPosted: Mon Sep 06, 2010 4:07 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
pclissold wrote:
Use DNS:
Code:
abc.com.   A       12.34.56.78
uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.


That would only work if placed in the .com zone, which is probably exceedingly unlikely. Also, it wouldn't solve the telling-Apache-about-it problem.

You're going to end up needing to create each domain individually in the DNS manager, but you can use ServerAlias in Apache to specify alternate names for a virtual host:

Code:
ServerName example.com
ServerAlias www.example.com
ServerAlias example.org
ServerAlias www.example.org
...


I believe there's an option in Apache that'll have it redirect requests for ServerAliases to the ServerName, too, but it's been awhile and I can't recall what it is. (If not, mod_redirect would work too.)

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
PostPosted: Mon Sep 06, 2010 7:09 pm 
Offline
Junior Member

Joined: Mon Nov 21, 2005 4:23 pm
Posts: 46
mactac wrote:
for example, domain xyz.com should end up bringing up website abc.com (with abc.com in the bowser address bar).


This part won't work with pure DNS, will it?. I think you're gonna have to do Apache redirects.


Top
   
 Post subject:
PostPosted: Tue Sep 07, 2010 9:34 am 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
pclissold wrote:
Use DNS:
Code:
uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.

The DNS Manager won't let you do specifically that, due to a strict reading of RFC 1912 section 2.4. If it were www.uvw.com, it would work.

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
 Post subject:
PostPosted: Tue Sep 07, 2010 10:05 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
jed wrote:
pclissold wrote:
Use DNS:
Code:
uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.

The DNS Manager won't let you do specifically that, due to a strict reading of RFC 1912 section 2.4. If it were www.uvw.com, it would work.

I took the examples from mactac's question -- I should have been more careful / specific.

_________________
/ Peter


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group