For example, my RSS feed used to be:
http://feeds.feedburner.com/myusername But FeedBurner allows me to set a "CNAME" record and have this instead:
http://feeds.MYDOMAIN.com/myusername I would like to offer a similar service to my users. I am looking for guidance on how to do this. Read up the CNAME stuff I could find online (but most of it is about how to set it up, not how to *offer* it as a FeedBurner kind of provider).
I also found some useful threads on this forum: e.g., [webmasterworld.com...] - but they are dead and they don't exactly have all the info.
Let me illustrate with an example:
1. MYDOMAIN is my website.
2. MYUSER is someone who uses my site. Currently he accesses the webservice on my site as
http://MYDOMAIN.COM/html/MYUSER 3. He also owns a domain called HISDOMAIN.COM.
4. I would like him to have the same functionality as in Step 2 (on my site) when he types in:
http://MYDOMAIN.HISDOMAIN.COM/ 5. On my website, I will ask him for HISDOMAIN.COM and in my database I will associate the user MYUSER with HISDOMAIN.COM.
Hope I have explained this clearly. Now my question: for enabling step 4, do I need to do anything special from my side? I suppose some RewriteRules etc would be in order so that I can take the HTTP_HOST and get "HISDOMAIN.COM" from it and then look it up in my database.
Would appreciate if someone could either offer some advice or point me in the direction of some article that covers this info. Thanks!
http://MYDOMAIN.HISDOMAIN.COM/" type service because that would mean that anyone would just pass off my site as their own domain. What I would like to do is that when that URL is typed, I check "HISDOMAIN.COM" in my DB and only allow functionality that is tied to MYUSER, otherwise show a polite error.
Thanks!
My RSS feeds used to be:
[feeds.feerburner.com...]
But with the above service, I can have my feeds at:
[feeds.mysite.com...]
Because FeedBurner allows me to point feeds.mysite.com as a CNAME to feedburner.com.
My question: how does the feedburner side make this happen? What does their Apache look for?
I am Google in this example, not the feed owner. As my original question suggests, I want to offer this functionality to my end users.
My question is: how should I ask my end users to set up CNAME to point to my website. What does my Apache on my end need to recognize different CNAME entries?
Thanks. I hope I am clearer this time.
Let me give an example, again:
My website is: TOPSERVICE.COM
My enduser's website is: USER.NET
I want TOPSERVICE.USER.NET to point to my server. So let's say that USER.NET on his domain has already set a CNAME to point to TOPSERVICE.COM.
So now in my Apache httpd.conf, what rules should I write? I doubt it will be ip-based. It has to be host name based. Right?
Once apache is responding, you're pretty much done with httpd.conf. Now you make your page-serving scripts (PHP, Perl, whatever) check the Host: header (probably by the HTTP_HOST request variable) and serve up content based on that. E.g., look up the domain in a database to see which user owns it, and then serve up a page for that user. If no user owns the domain, serve up an error page.
1. Strictly speaking you could use name-based virtual hosting:
<VirtualHost 192.168.2.10>
ServerName vanity-domains.example.com
ServerAlias example.customer-1.com example.customer-2.com ...
</VirtualHost> The CNAME mapping does in fact point to something, but I am not sure what. Let me explain.
I have a dedicated hosting set up on server. Let's call it
dedicatedhosts.com. That's where the Apache is running. This is on IP 22.22.22.10 (masked here). From this host server are running about twenty domains. Each of them has a
VirtualHost entry. The IP always remains the same for each of these domains: 22.22.22.50 (masked here, but you get the idea). So each working website from my dedicated server looks like this in the httpd.conf file:
<VirtualHost 22.22.22.50:80>
ServerName mysite.com
DocumentRoot /home/mysite/public_html
...
</VirtualHost><VirtualHost 22.22.22.50:80>
ServerName myother.com
DocumentRoot /home/myother/public_html
...
</VirtualHost>
And so on.
Let's call the one I am interested in
mysite.com. This domain site is live and working. Since many years. With user IDs and all that. Now I want to allow
mysite.userdomains.com as explained, where userdomains.com is an end-user's website. To test the CNAME functionality I took one of my own web domains, say,
myother.com as an example end-user's website and set a CNAME on it to point to mysite.com. To my surprise, this "works": when I now try
mysite.myother.com it brings up a Cpanel default page. But this is not the index.php page on mysite.com or anything. My question: where is this default Cpanel page coming from? How can I make the CNAME point to a particular page or program?
NameVirtualHost 22.22.22.50:80 or NameVirtualHost *:80. You're getting the CPanel default page because that's the default page apache is set to serve when no corresponding VirtualHost is found. First, peruse Apache's documentation [httpd.apache.org], because CPanel is probably not going to help you (if my experience with cpanel is any indication, it'll actively work against you). Then you need to do one of two things:
How can I make the CNAME point to a particular page or program?
I think you might be confused about what, exactly, a CNAME does. A CNAME essentially says 'this domain has the same IP address as that other domain'. That's it.