Forum Moderators: phranque

Message Too Old, No Replies

Subdomains with Apache

Clues on how to set up multiple subdomains on Apache.

         

berrysharpie

4:27 pm on May 22, 2006 (gmt 0)

10+ Year Member



Hi,

I am wondering if anyone knows the cleanest way to set up say *wildcard* subdomains with Apache. We have multiple subdomains we are considering and rather than relying on human error to set them up, we would like to use a wildcard system to set up the subdomains.

Does anyone have any thoughts or ideas on what is the best way to do such a thing?

Cheers,

Berry

coopster

9:44 pm on May 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, berrysharpie.

What do you mean by a wildcard system? If you have multiple subdomains you are going to serve up different content, no? Apache's Virtual Host [httpd.apache.org] feature handles this nicely. You setup a different <VirtualHost> container for each subdomain, one of which could have a ServerAlias that matches any other subdomains not specifically set up. The Apache documentation explains this in detail.