Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Jan 18, 2011 8:43 pm 
Offline
Newbie

Joined: Tue Nov 23, 2010 5:44 am
Posts: 4
Hi,

Here is the scenerio I have a couple of virtual hosts in my server all translating to one ip. Now, if I point any domain to the ip address directly, it will load the default virtual host.

ie say anyrandomdomain.com with an A record to say 222.222.222.222 (servers ip) will lead to mysite1.com

but how do you specifically seperate it to a different virtual host via wild cards such as

bucket.anyrandomdomain.com to mysite2.com instead of mysite1.com

ie bucket.*.* to /localtion/to/mysite2/public_html?

Because I dont know what anyrandomdomain could be, I can't make a specific file under sites-available and think my only way is add an entry to http.conf (/etc/apache2).

Can anyone help me with as to what should be done to get the results am look for? It will be greatly appreciated. Thanks!


Top
   
PostPosted: Wed Jan 19, 2011 7:56 am 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
simply wrote:
Hi,

Here is the scenerio I have a couple of virtual hosts in my server all translating to one ip. Now, if I point any domain to the ip address directly, it will load the default virtual host.

ie say anyrandomdomain.com with an A record to say 222.222.222.222 (servers ip) will lead to mysite1.com

but how do you specifically seperate it to a different virtual host via wild cards such as

bucket.anyrandomdomain.com to mysite2.com instead of mysite1.com

ie bucket.*.* to /localtion/to/mysite2/public_html?

Because I dont know what anyrandomdomain could be, I can't make a specific file under sites-available and think my only way is add an entry to http.conf (/etc/apache2).

Can anyone help me with as to what should be done to get the results am look for? It will be greatly appreciated. Thanks!


I believe you are looking for ServerAlias


Top
   
 Post subject:
PostPosted: Wed Jan 19, 2011 3:02 pm 
Offline
Newbie

Joined: Tue Nov 23, 2010 5:44 am
Posts: 4
Thanks a lot hawk7000, I rethought about ServerAlias and added an entry to mysite2.com's conf file and it seems to have worked!!

I added two entries:

ServerAlias bucket*.*.*
ServerAlias bucket*

Hopefully I wont need both.

For future reference for anyone with a similar problem. ServerAlias parameter under your /etc/apache2/sites-available/example.com can carry wildcards to any domain and not necessarily only subdomains to say example.com.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group