Wild Card dns Installation Help

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,725
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
Hello,

I have a customer who wants a wild card on his subdomains, so each subdomain that isn't correctly typed in or just any subdomain that isn't created period to redirect to a default one automaticly.

I believe you edit the dns somehow but I'm stumped for now.

In case I'm explaining this wrong. It would be the same way email is captured even though the email address is incorect.

Just for subdomains instead :)

Any assistance might help your journey into the after life. (or not)

Thanks,

Charles
 

JustinK

Well-Known Member
Sep 4, 2001
251
0
316
See if the info in this thread at WHT does it for you (and ignore the stuff about static/dedicated as I think that all got mixed up in the the thread):
http://www.webhostingtalk.com/showthread.php?s=&threadid=47167
 

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,725
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
Hey thanks,

This is what I needed:

&VirtualHost 10.1.1.1&
ServerName blah.dom
ServerAlias *.blah.dom
...
&/VirtualHost&

I'm going to say something dumb now.

Where it sais &blah.dom& and &*.blah.dom& and &blah.dom& is sapposed to be &mydomain.com& and &*.mydomain.com& and is &10.1.1.1& the same that I use?

And one more dummy.

Where do I insert the code? In the bottom or the top of the ect.. of the virtual zone of the http.config

Everytime I've pico the http.config in the past apache crashes.

Can you help so I don't crash apache when I insert this.

Thank you sir,

Charles
 

JustinK

Well-Known Member
Sep 4, 2001
251
0
316
open up the httpd.conf file with pico, then find where that domain's info is. Search for the line:
ServerName blah.dom

After that line, make a new line and put:
ServerAlias *.blah.dom

Remember that blah.dom is to be replaced with your domain name. Ctrl+X to go through the saving process and then restart apache:
/etc/init.d/httpd restart

Just remember, no subdomains for the domain that you make in cpanel will work after doing this.