
4th June 2007, 19:13
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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 !
|

5th June 2007, 13:45
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Anyone? Please?
|

5th June 2007, 19:48
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,602 Times in 2,451 Posts
|
|
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.
|

5th June 2007, 20:11
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

6th June 2007, 16:04
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,602 Times in 2,451 Posts
|
|
You need to add myownblog.com to the ServerAlias directive, but I don't know what you have to change in Wordpress.
|

6th June 2007, 17:06
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

6th June 2007, 17:21
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

6th June 2007, 17:22
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,602 Times in 2,451 Posts
|
|
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.
|

10th June 2007, 01:16
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

10th June 2007, 15:04
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,602 Times in 2,451 Posts
|
|
You can try wildcards (*) in the ServerAlias line, but I'm not sure if this works.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
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
|
|
|
All times are GMT +2. The time now is 14:41.
|
|
Recent comments
8 hours 31 min ago
13 hours 23 min ago
22 hours 16 min ago
23 hours 15 min ago
1 day 3 hours ago
1 day 4 hours ago
1 day 7 hours ago
1 day 15 hours ago
2 days 1 min ago
2 days 1 hour ago