[Zope] Apache URhell (revisited)

mh mh at mhhq.com
Fri Dec 12 02:12:15 EST 2003


Thanks to those that responded off-list to my original query, but I'm
still having no joy whatsoever in getting Zope to properly handle
requests proxied to it from Apache. My Apache configuration is:

<VirtualHost 10.0.0.2>
ServerName www.test.com
ServerAlias test.com
RewriteEngine On
RewriteLog "/var/log/httpd/rewrite_log"
RewriteLogLevel 9
RewriteRule ^/(.*)
http://localhost:8080/VirtualHostBase/http/test.com:80/VirtualHostRoot/$1  [L,P]
</VirtualHost>

(RewriteRule directive shown wrapped over three lines.)

test.com is defined as a zone on my local name server pointing to
10.0.0.2.

I have a VirtualHostMonster in the Zope's root folder with no mappings
defined there. Also in the root folder is a folder "test.com" with the
default DTML document index_html.

When a request is made to www.test.com, Zope intercepts it but displays
the (acquired?) content from the root folder's index_html. Snippets from
the error_log show this:

TraversalRequestNameStack []
VirtualRootPhysicalPath ('',)
URL 'http://test.com:8080/%241'
SERVER_URL 'http://test.com:8080'
URL0 http://test.com:8080/%241
URL1 http://test.com:8080
BASE0 http://test.com:8080
BASE1 http://test.com:8080
BASE2 http://test.com:8080/%241

(No idea what the %241 implies, but it's there in the error log)

PATH_INFO '/VirtualHostBase/http/test.com:8080/VirtualHostRoot/$1'
HTTP_HOST '127.0.0.1:8080'
REQUEST_METHOD 'GET'
PATH_TRANSLATED '/VirtualHostBase/http/test.com:8080/VirtualHostRoot/$1'

The "/$1" on the end of PATH_INFO and PATH_TRANSLATED would suggest to
my naive eyes that Zope isn't properly mapping the URL to a local
resource, but that's just conjecture on my part. VirtualRootPhysicalPath
also looks a little suspect.

If I make an explicit request for
http://10.0.0.2:8080/VirtualHostBase/http/test.com:80/VirtualHostRoot/
(as suggested by an off-list response), then again, the root folder's
index_html is returned, not that of test.com. Requests to 127.0.0.1 as
opposed to 10.0.0.2 generate the same result.

Muchos kudos to anyone who can shed some light!

mh



More information about the Zope mailing list