Web Hosting Talk







View Full Version : Question: Domain Name WildCarding?


Isaac
03-01-2003, 12:08 PM
Hello folks.
J'ai une question pour l'experts de WebHosting here. I am running a website that is hosted with control panel cPanel and I was wondering how I could take advantages of my host's domain name wildcarding. How do I take control of it?

I have a user database in MySQL and when users register they not only get their own user account, but they get their own personal site to play around with sort of. http://theirusername.mydomain.com/ Where theirusername would be the name they register. How do I use domain name wildcarding to do this?

Oh yeah. :cartman: <--- Looks nothing like Cartman. Someone should do something about this.:mad:

Isaac. Blah.

flitcher
03-01-2003, 12:33 PM
Are you aware you started your question in French and then shifted to English at the end of the sentence? I found it funny because I started reading it in French and never realized it until I reached the last word in the sentence 'here'.

Anyway, for what you want I believe you will need to setup a script to create the subdomain upon their registration. I did a quick search on Google but could not find anything relevant. Hopefully someone else will know what you need. Sorry.

Isaac
03-01-2003, 01:22 PM
Originally posted by flitcher
Are you aware you started your question in French and then shifted to English at the end of the sentence? I found it funny because I started reading it in French and never realized it until I reached the last word in the sentence 'here'.

Anyway, for what you want I believe you will need to setup a script to create the subdomain upon their registration. I did a quick search on Google but could not find anything relevant. Hopefully someone else will know what you need. Sorry. Oui, je parle le francais tres bien et je suis learning more and more tous le jour.

Yes. I have searched and found nothing. But thank you for that information. I will search Hotscripts and other script places for relevant material.

Anyone else have an more input?

Vestirse
03-01-2003, 01:34 PM
I have no idea what domain name wildcarding is... ERM?

slade
03-01-2003, 02:06 PM
Domain wildcarding is putting a * in the dns entires of your domain. It allows you to make up any subdomain at will and have apache resolve it without having to predefine it.

I just keyed a * A record into one of my personal accounts and it appears to resolve. There is more that'll have to be done to make it work, but cpanel/whm does support it.

Ask your Host!

Isaac
04-03-2003, 11:18 PM
Originally posted by slade

Ask your Host! My host doesn't know how to use it in cPanel. Can anyone clue me in? Please?

ksstudio
04-04-2003, 07:37 AM
Hello Isaac,

If I am correct, you are talking about wildcard sub domains NOT domains.

(Just ignore my message if I am wrong)

To do wildcard sub domains, 2 things you have to modify:
(You can't do this directly since you don't have root access, you may ask your host to help you out)

1) Add a new entry in your domain DNS zone as below, this can be done from Web Host Manager > Dns Functions > Edit a DNS Zone

* 14400 IN CNAME Yourdomain.com. <--- make sure there is a dot after .com


2) Edit Apache configuration file and add entry as below:

/usr/local/apache/conf/httpd.conf

Add *.YourDomain.com to your apache entry.

It will looks like below:

<VirtualHost 123.123.123.123>
ServerAlias www.YourDomain.com YourDomain.com *.YourDomain.com
ServerAdmin webmaster@YourDomain.com
DocumentRoot /home/UserName/public_html
BytesLog domlogs/YourDomain.com-bytes_log
User UserName
Group UserName
ServerName www.YourDomain.com
CustomLog domlogs/YourDomain.com combined
ScriptAlias /cgi-bin/ /home/UserName/public_html/cgi-bin/
</VirtualHost>


Hope can help.


Chan

sprintserve
04-04-2003, 08:47 AM
ksstudio, The subdomain wildcarding you are telling him to do does nothing except to redirect all the subdomains to the main site. That's not what he requires.

Issac, to do what you need, you would need to modify the DNS zone database. Since you are on a shared server, I doubt you have access to it. You can probably write a custom script though to do it, if you host allows it.

It may also be possible to take advantage of Cpanel's subdomain creation script. But I haven't taken a look at the script before.