Get Paid to Participate     Twitter     Facebook     Google+
Hosting Discussion
 

forgot password?


Reply


Old
  Post #1 (permalink)   03-26-2006, 11:13 AM
HD Management Staff
 
Artashes's Avatar
 
Join Date: Apr 2003
Posts: 7,716

Status: Artashes is offline
One of my projects requires setting the "subdomain resolution" to a "wildcard" setting.

This makes it so whatever subdomain a visitor puts in (i.e. test.example.com) it resolves back to the main domain name example.com

" *.example.com " redirects to -> " example.com "

In more technical terms (according to programmer) I need to add "ServerAlias *.example.com" to the httpd.conf file (but that to me is like Chinese to a Ukrainian).


Any idea on how to make this work? Where and how it can be accomplished?

Thank you.
__________________
HostingDiscussion.com - web hosting community for grown-ups.

FORUM RULES | NEWS BLOG | HOSTING SHOWCASE | Follow us on Twitter
 
 
 


Old
  Post #2 (permalink)   03-26-2006, 11:34 AM
HD Newbie
 
Join Date: Mar 2006
Location: Port Richey, Florida
Posts: 25

Status: DavidL is offline
You are on the right path with httpd.conf
What you would do is
<VirtualHost 107.***.**.**>
DocumentRoot /home/domain.net/public_html
User username
Group usergroupname
ServerAlias *.domain.net
ServerName www.domain.net
RedirectMatch 301 (.*) http://domain.net$1
</VirtualHost>
Let me know how it works.

---edit---
forgot about bind
in your cp dns entries you want to forward the subdomain to an ip
*.domain.net. 14400 IN A 107.***.**.**
remember to fill in your normal ip

--edit again lol--
service named restart
service httpd restart
__________________
-Dave
BlueGrid LLC

Last edited by DavidL : 03-26-2006 at 11:41 AM.
 
 
 


Old
  Post #3 (permalink)   03-26-2006, 11:47 AM
HD Management Staff
 
Artashes's Avatar
 
Join Date: Apr 2003
Posts: 7,716

Status: Artashes is offline
Thanks a bunch, David.
Can it work with a shared IP or should it be a dedicated IP?
__________________
HostingDiscussion.com - web hosting community for grown-ups.

FORUM RULES | NEWS BLOG | HOSTING SHOWCASE | Follow us on Twitter
 
 
 


Old
  Post #4 (permalink)   03-26-2006, 11:48 AM
HD Newbie
 
Join Date: Mar 2006
Location: Port Richey, Florida
Posts: 25

Status: DavidL is offline
It should work with a shared ip as httpd will still tell it to point to the right directory.
__________________
-Dave
BlueGrid LLC
 
 
 


Old
  Post #5 (permalink)   04-25-2006, 02:07 PM
HD Newbie
 
Join Date: Apr 2006
Posts: 7

Status: littleswebhost is offline
Yeah, that should definitly work. Good Luck!
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: