* Jaume Teixi ([EMAIL PROTECTED]) [000324 19:29]: > Whats the nice dynamically configured httpd.conf that could handle the > following > > root.domain.com goes to /var/www > domain.com goes to /var/www > www.domain.com goes to /var/www/domain > webs.domain.com goes to /var/www/webs > www.customer1.com goes to /var/www/webs/www.customer1.com > customer1.com goes to /var/www/webs/www.customer1.com > www.customerN.com goes to /var/www/webs/www.customerN.com > customerN.com goes to /var/www/webs/www.customerN.com >
You can install the mod_macro.c in your apache and then you can cofigure it like this: --- cut here --- ### First you define a macro ### <Macro myStdVirtualHost $vhost $alias $admin $docroot> <VirtualHost $vhost:80> Options Indexes IncludesNOEXEC SymLinksIfOwnerMatch -ExecCGI MultiViews ServerName $vhost ServerAlias $alias ServerAdmin $admin DocumentRoot $docroot </VirtualHost> </Macro> ### if you have a lot of customer you can define a new macro Ex: <Macro myStdCustomer $customer> <VirtualHost $customer.com:80> Options Indexes IncludesNOEXEC SymLinksIfOwnerMatch -ExecCGI MultiViews ServerName $customer.com ServerAlias www.$customer.com ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/www/webs/www.$customer.com </VirtualHost> </Macro> ### next define your Virtuals ### Use myStdVirtualHost "root.domain.com" "domain.com" "[EMAIL PROTECTED]" "/var/www" Use myStdVirtualHost "www.domain.com" "www.domain.com" "[EMAIL PROTECTED]" "/var/www/domain" Use myStdVirtualHost "webs.domain.com" "webs.domain.com" "[EMAIL PROTECTED]" "/var/www/webs" Use myStdCustomer "customer1"

