Reputation: 4826
I have my domain name point all subdomains to a server:
domain.com client.domain.com
I am trying to think of a vhost configuration that would automatically take the first part of the sub domain and set this folder as the document root, for example:
client.domain.com => /path/to/vhost/domain.com/client
client2.domain.com => /path/to/vhost/domain.com/client2
etc.
Does anyone know if this is possible?
Thanks,
Ian
Upvotes: 0
Views: 59
Reputation: 7706
Have a look at http://httpd.apache.org/docs/2.0/misc/rewriteguide.html - and specifically at the Virtual User Hosts example.
Upvotes: 1