[Zope-dev] Zope, VirtualHosts, mod_rewrite and you.

Steve Spicklemire steve@estel.uindy.edu
Wed, 23 Jun 1999 11:11:16 -0500 (EST)


Hmm.. there seems to be difference between 1.10.2 and 1.10.3 here...

I add a rewrite to strip the highest folder that Zope puts in with
it's 'base' tag. I'd love it if there were some <maybe Environment variable?>
that would enable virtual hosts to strip stuff out of the Zope base tags.

I think I could patch HTTPResponse.py to do that... but I'm wondering if
the DC folks would love it.....

My solution has to change when switching. It seems that in 1.10.2 this works:

<VirtualHost foo.spvi.com>
Port 80
ServerAdmin steve@spvi.com
DocumentRoot /webroot/sites/test1/
ServerName foo.spvi.com
ErrorLog /var/log/foo_error.log
TransferLog /var/log/foo_access.log
RewriteEngine on
RewriteRule ^/foo/(.*) /$1
RewriteCond %{HTTP:Authorization}  ^(.*)
RewriteRule ^/(.*) /usr/local/etc/zope/Zope.cgi/foo/$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
</VirtualHost>

but in 1.10.3 I need this.....

<VirtualHost foo.spvi.com>
Port 80
ServerAdmin steve@spvi.com
DocumentRoot /webroot/sites/test1/
ServerName foo.spvi.com
ErrorLog /var/log/foo_error.log
TransferLog /var/log/foo_access.log
RewriteEngine on
RewriteRule ^/foo/(.*) /$1
RewriteCond %{HTTP:Authorization}  ^(.*)
RewriteRule ^(.*) /usr/local/etc/zope/Zope.cgi/foo$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
</VirtualHost>

(notice that there is no '/' after the 'foo' in the last Rewrite)

this is apache 1.3.4

-steve