I'm struggeling with configuring Apache 1.3. I want to set an environment variable and set logfiles to a dynamic name. I rewrite a part of the url, get the prefix (which is the name of the website i want to load) and set the document root with a rewrite rule.
The above is ofcourse not working, but it gives you the idea of what im trying to do. The main problem is the loggin to the right errorfile and the setenv.
I understand that setenv is called after all the apache forks/redirects an rewrite, so setenv will never help me with my problem. The question is, how can i solve this puzzle (which mod should i use to do this trick, if possilbe)
mcvdmvs
"It never hurts to help" -- Eek the Cat
Code:
<VirtualHost *>
# Rewrite
RewriteEngine on
RewriteOptions MaxRedirects=10
RewriteLog /var/log/[URL unfurl="true"]www/rewrite.log[/URL]
RewriteLogLevel 0
RewriteCond %{HTTP_HOST} ^(.+)\.office\.company\.nl$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule %{DOCUMENT_ROOT} /project/$1/trunk/htdocs/
Port 80
ServerAdmin webmaster@company.nl
ServerName $domain
DocumentRoot /project/$domain/trunk/htdocs/
SetEnv CONFIG_DIR /project/$domain/trunk/config/
# Loggin
ErrorLog /var/log/[URL unfurl="true"]www/$domain.error[/URL]
TransferLog /var/log/[URL unfurl="true"]www/$domain.access[/URL]
Alias /uploaded/ /project/$domain/uploaded/
# php
php_admin_flag magic_quotes_gpc off
php_admin_flag register_globals off
</VirtualHost>
The above is ofcourse not working, but it gives you the idea of what im trying to do. The main problem is the loggin to the right errorfile and the setenv.
I understand that setenv is called after all the apache forks/redirects an rewrite, so setenv will never help me with my problem. The question is, how can i solve this puzzle (which mod should i use to do this trick, if possilbe)
mcvdmvs
"It never hurts to help" -- Eek the Cat