On 13/5/02 3:24 pm, "Oliver Bleutgen" <myzope@gmx.net> wrote:
<VirtualHost *> RewriteEngine On RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}:80/$1 [L,P]
This won't work when a client includes the port in the host header, like Host: zaphod-content.mydomain.com:80. Some clients do that, wget for instance, and you'll get an extra ":80" in your request to zope.
Ah, ok. The reason I did this is that the original had RewriteCond %{HTTP_HOST}:80 ^.*$ and this only worked if I included the :80 in my browser line.
<IfModule mod_proxy.c> ProxyRequests On
Are you sure you want that? You now have open your server as a proxy for the whole world, if no other access rules are installed. You don't need that for what you describe here, see http://httpd.apache.org/docs/mod/mod_proxy.html#proxyrequests
My main reason for including that is that the zope document I read at http://www.zope.org/Members/Jace/apache-vhm said I should include those lines. I shall remove it. Thanks for the tip :)
Any ideas why the contents of zaphod-content.mydomain.com are not being served as / when I request it as zaphod-content.mydomain.com ?
Well, it seems that your rule doesn't match. I would enable logging for mod_rewrite (see docs for how to do that) and see what the rewrite
I have done this at a rewriteloglevel of 3 and I get the following output: sd213.52.146.197 - - [13/May/2002:15:27:30 +0100] [zaphod-content.mydomain.com/sid#80dd578][rid#8134048/initial] (2) init rewrite engine with requested uri / 213.52.146.197 - - [13/May/2002:15:27:30 +0100] [zaphod-content.mydomain.com/sid#80dd578][rid#8134048/initial] (3) applying pattern '^/(.*)' to uri '/' 213.52.146.197 - - [13/May/2002:15:27:30 +0100] [zaphod-content.mydomain.com/sid#80dd578][rid#8134048/initial] (2) rewrite / -> http://127.0.0.1:8080/VirtualHostBase/http/zaphod-content.mydomain.com:80/ 213.52.146.197 - - [13/May/2002:15:27:30 +0100] [zaphod-content.mydomain.com/sid#80dd578][rid#8134048/initial] (2) forcing proxy-throughput with http://127.0.0.1:8080/VirtualHostBase/http/zaphod-content.mydomain.com:80/ This to me looks correct. The request is being translated to http://127.0.0.1:8080/VirtualHostBase/http/zaphod-content.mydomain.com:80/ Or is this not what it should be proxied to ? -- Wayne Pascoe <wayne.pascoe@ehsbrann.com> Give me enough medals, and I'll win any war. - Napolean