[clug-talk] Apache VHost question

Shawn sgrover at open2space.com
Thu Nov 11 18:16:11 PST 2004

I have a client hosting his server with me.  He wants to be able to have 
sub-domains of his primary domain.  He manages his own server via ssh, but 
all web traffic goes through my Apache gateway (then redirected as needed by 
the virutal host names).

I'm having a problem figuring out how to allow his sub-domains, without me 
needing to reconfigure my VHOSTS everytime he makes a change.  For example, 
www.xyz.com points to his server.  He want's to be able to create arbitrary 
sub-domains like 123.xyz.com, and abc.xyz.com.  Does anyone know of a way to 
do this without having to update my gateway's config everytime he creates a 
new sub-domain?

I'm thinking something like so:

	ServerName xyz.com
	ServerAlias *.xyz.com	#not sure if this will work

Can you do wildcard characters like that?  Also, how would I pass the data to 
his server while keeping the HTTP headers intact (so his server can handle 
the virtualhost stuff for him).  Or is this a case where I tell him he needs 
to purchase the use of an IP from me?  (This is very easy if I redirect all 
traffic on a specific IP to his server.)

Any tips are appreciated.


More information about the clug-talk mailing list