Wayne, some remarks. Wayne Pascoe wrote:
Hi all,
I've seen similar things discussed on the list, but not quite this question.
I have setup the virtualhostmonster in my root folder. In my apache config, I have the following:
<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.
<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
ProxyVia On </IfModule> </Virtualhost>
The rewriterule has wrapped to two lines in this e-mail, but in my config it is on one.
I have got an A record, zaphod-content.mydomain.com pointed at the IP Address that the Apache httpd server is listening on. In Zope, I have added a folder named zaphod-content.mydomain.com off of root. This has an index_html document in it.
When I connect to http://zaphod-content.mydomain.com I get the normal localhost:8080/ page. If I go to http://zaphod-content.mydomain.com/zaphod-content.mydomain.com I get what I expect to.
zaphod-content is not the primary name of this machine. The primary name is zaphod. Going to this also gives me the content I would expect to see at localhost:8080/
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 engine does. cheers, oliver