Dynamic Multi-level Subdomain Virtualhost Config... Need help
am 19.06.2007 19:54:22 von Alan
I'm working on a development web-server and am trying to get a
multilevel subdomain setup working.
Basically, imagine the following subdomains:
http://project1.user1.domain.com >> /home/user1/project1/www/
http://project2.user1.domain.com >> /home/user1/project2/www/
http://project1.user2.domain.com >> /home/user2/project1/www/
http://project3.user2.domain.com >> /home/user2/project3/www/
I'd like to do this dynamically, so we don't have to maintain an
increasingly complex virtual hosts configuration.
I've tried playing with the examples [URL="http://httpd.apache.org/
docs/2.0/vhosts/examples.html"]here[/URL], but nothing has come close
to working for me, yet.
Does anyone have a working example of this type of dynamic setup, or
suggestions on approach. I've spent most of the morning reading about
it and I haven't made much progress.
thanks a lot,
-alan-
Re: Dynamic Multi-level Subdomain Virtualhost Config... Need help
am 19.06.2007 22:21:24 von Joshua Slive
On Jun 19, 1:54 pm, alan wrote:
> I'm working on a development web-server and am trying to get a
> multilevel subdomain setup working.
>
> Basically, imagine the following subdomains:http://project1.user1.domain.com>> /home/user1/project1/www/http://project2.user1.domain.com>> /home/user1/project2/www/http://project1.user2.domain.com>> /home/user2/project1/www/http://project3.user2.domain.com>> /home/user2/project3/www/
>
> I'd like to do this dynamically, so we don't have to maintain an
> increasingly complex virtual hosts configuration.
>
> I've tried playing with the examples [URL="http://httpd.apache.org/
> docs/2.0/vhosts/examples.html"]here[/URL], but nothing has come close
> to working for me, yet.
>
> Does anyone have a working example of this type of dynamic setup, or
> suggestions on approach. I've spent most of the morning reading about
> it and I haven't made much progress.
That would be a very standard application of mod_vhost_alias:
http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html
http://httpd.apache.org/docs/2.0/vhosts/mass.html
Joshua.