[Zope] virtual host monster problem

Andreas Pakulat apaku at gmx.de
Thu Jan 6 17:58:22 EST 2005


On 06.Jan 2005 - 21:59:01, johan30 at easynet.be wrote:
> hi,
> 
> I have a question of virtual host monster in combination with a virtual plone site, in combination with an apache site
> 
> I have an url http://212.100.163.214:8080/help  that should be directed to http://212.100.163.214/help    : this means that everytime i go to the url or http://212.100.163.214/help , I should arrive to http://212.100.163.214:8080/help    , which is a zope site. I have installed vhm in the root folder of http://212.100.163.214:8080 and i have as httpd.conf zope-part : 

That's exactly what I do for my zope-site...

> LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so
> AddModule mod_proxy.c
> <VirtualHost 212.100.163.214>
>             ServerAdmin johan.boeckx at be.easynet.net
>             DocumentRoot /opt/jffnms/htdocs
>             ServerName managedrouters.easynet.be
> </VirtualHost>
> <VirtualHost *>
> ServerName managedrouters.easynet.be/help
> ServerAdmin johan.boeckx at be.easynet.net
> ServerAlias managedrouters.easynet.be/help
> ProxyPass / http://212.100/163.214:8080/VirtualHostbase/http/managedrouters.easynet.be:80/help/VirtualHostRoot/
> ProxyPassReverse / http://212.100/163.214:8080/VirtualHostbase/http/managedrouters.easynet.be:80/help/VirtualHostRoot/
> 
> </VirtualHost>

First thing: The ProxyPass line has an invalid IP: 212.100_/_163.214
anyway I'm using something like:

LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
<VirtualHost 212.100.163.214>
	ServerAdmin ...
	DocumentRoot ...
	ServerName ...
	RewriteEngine on
	RewriteRule ^/(.*)
	http://212.100.163.214:8080/VirtualHostBase/http/212.100.163.214/help/VirtualHostRoot/$1
	[P]
</VirtualHost>
<VirtualHost *>
	DocumentRoot ...
</VirtualHost>
	
This rewrites any access to the normal IP to the Zope/help thing and
makes that the server-name again (so nobody sees that it's Zope
actually serving the pages). Have a look at the doc for the
RewriteRule on how to match only for serverip/help instead of
everything (out off my head I think RewriteRule ^/help/(.*) ... might
be the right)

Andreas

-- 
You now have Asian Flu.


More information about the Zope mailing list