(Apologies for a potential duplicate posting of this message) 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
Argh ... I sorted it! The moral of the story is RTFM, but when you read, make sure what you read is what is actually written, not just what you think you read ... Next (newbie) question: Is it possible to use rsync with Zope, or is it just ftp? On Fri, 2003-12-12 at 15:16, mh wrote:
(Apologies for a potential duplicate posting of this message)
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
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Sat, Dec 13, 2003 at 06:24:11AM +0000, mh wrote:
Argh ... I sorted it!
The moral of the story is RTFM, but when you read, make sure what you read is what is actually written, not just what you think you read ...
Next (newbie) question: Is it possible to use rsync with Zope, or is it just ftp?
ftp or webdav. No rsync. That would be cool, wouldn't it? -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's ASTRO-BUSTER FIREMAN! (random hero from isometric.spaceninja.com)
On Sat, 13 Dec 2003, mh wrote:
Argh ... I sorted it!
The moral of the story is RTFM, but when you read, make sure what you read is what is actually written, not just what you think you read ...
Next (newbie) question: Is it possible to use rsync with Zope, or is it just ftp?
It depends on what you want to do. We use rsync here to keep a 'wrm' standby server and for daily backups. The main issue is trying to run rsync against a server that is actively in use. We use DirectoryStorage and put the storage in snapshot state and then run the rsync (beware rsync uses memory in proportion to the number of files to be copied, DirectoryStorage can create a *lot* of files). there is also repozo.py which can copy an in-use Data.fs file, then you could use rsync against that. It would probably be fairly efficient as Data.fs is only appended to (apart from when you pack it, when it is re-written). -Matt -- Matt Hamilton matth@netsight.co.uk Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Hosting | Web Design | Domain Names | Co-location | DB Integration
participants (3)
-
Matt Hamilton -
mh -
Paul Winkler