Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th June 2007, 20:13
fannar fannar is offline
Junior Member
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Domain Mapping

I were wondering if anyone could help me with domain mapping something like wordpress.com, stikipad.com, shopify.com and many others are offering.

Most of them ask you to use CNAME, which I think I would prefer over asking my customers to use my nameservers.

What I'm looking for is to map mydomain.com to subdomain.domain.com. I were just wondering what you think is the best solution regarding the server side, PHP side is OK.

I will be using Apache. How should the config file be configured?

Hope to hear some comments on this !
Reply With Quote
Sponsored Links
  #2  
Old 5th June 2007, 14:45
fannar fannar is offline
Junior Member
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Anyone? Please?
Reply With Quote
  #3  
Old 5th June 2007, 20:48
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

So you want subdomain.domain.com to point to domain.com? Just create a CNAME or A record, and in domain.com's vhost configuration you must add subdomain.domain.com to the ServerAlias line. Restart Apache afterwards.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 5th June 2007, 21:11
fannar fannar is offline
Junior Member
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well its more like this:

1) someblog.blogs.com wants to set up his own domain for this blog
2) He registers myownblog.com
3) He creates CNAME for myownblog.com (which I'm not sure how to do, wheras most hosting companies just allows subdomains to be CNAMEs??)
4) The CNAME points to someblog.blogs.com

The question is then, do I need to add myownblog.com as ServerAlias for blogs.com ? And then map that in my code than when its myownblog.com it should use the data from "someblog" ?

What I'm not getting is how does wordpress.com allow your own domain, do they add it to their Apache config file as ServerAlias? It sounds very stupid to me. But maybe the only way ?

Make a script to add the domain as ServerAlias, reload the config and then read the HTTP header and find out this domain is mapped to some user?

So it should be:
myownblog.com CNAME someblog.blogs.com

In blogs.com config:
ServerAlias myownblog.com

Mysql:
myownblog.com is owned by someblog

Thanks a lot.
Reply With Quote
  #5  
Old 6th June 2007, 17:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

You need to add myownblog.com to the ServerAlias directive, but I don't know what you have to change in Wordpress.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 6th June 2007, 18:06
fannar fannar is offline
Junior Member
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok. But what is then the best way to add a CNAME to myownblog.com topdomain ? If the hosting provider just allows subdomains to be added as CNAMEs ?
That is this works:
blog.myownblog.com CNAME someblog.blogs.com

So when someones goes to blog.myownblog.com it is aliasing someblog.blogs.com. But if I would like myownblog.com be aliased to someblog.blogs.com, some ideas?

Thanks.
Reply With Quote
  #7  
Old 6th June 2007, 18:21
fannar fannar is offline
Junior Member
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also what I don't get, if I'm adding ServerAlias for each domain for each user to the config file, won't it be very hard to allow users to change their domain ?

User goes into blogs.com control panel, adds myownblog.com as his domain for someblog.blogs.com. Blogs.com adds myownblog.com as ServerAlias for blogs.com? User adds CNAME to myownblog.com (to blogs.com or someblog.blogs.com, what is the different?) And then blogs.com matched that myownblog.com should be someblog.blogs.com?

You get my point ?

Thanks.
Reply With Quote
  #8  
Old 6th June 2007, 18:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Quote:
Originally Posted by fannar
If the hosting provider just allows subdomains to be added as CNAMEs ?
Then you'd either have to negotiate with your provider, or set up your own nameservers.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 10th June 2007, 02:16
fannar fannar is offline
Junior Member
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok thanks Falko

But are you telling me that all these services is adding ServerAlias to their domain config files ? It seems quite supid to me to reload Apache after each domain map.
Reply With Quote
  #10  
Old 10th June 2007, 16:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
 
Default

You can try wildcards (*) in the ServerAlias line, but I'm not sure if this works.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Webmail problems with only one domain? compner Installation/Configuration 14 16th February 2010 17:59
One Domain Name Not Responding Authoritatively bluethunder82 Installation/Configuration 5 9th September 2007 17:09
This is %#@*&^$# embarrassing! domino Smalltalk 34 5th February 2007 22:57
Server Not Autorative for Domain Error drbista Installation/Configuration 10 20th December 2005 17:41
postfix config jmroth Installation/Configuration 6 18th September 2005 16:58


All times are GMT +2. The time now is 05:54.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.