[Zope] RE: Users cannot acces sites

Roel Van den Bergh roel@planetinterior.com
Wed, 11 Sep 2002 12:42:29 +0200


> Stefan H. Holek wrote:
> > You are missing the VirtualHostRoot keyword in your rewrite rule. Also
> > note that HTTP_HOST may include the port (if it is not 80 IIRC).
> >
> > RewriteRule ^/(.*) \
> >
> http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}:80/Virtual
> HostRoot/
> > $1 [L,P]
>
>
> This "http/%{HTTP_HOST}:80/VirtualHostRoot/" is dangerous. More exactly,
> the trailing :80 will bite you if the client sends the port
> together with the hostname. The standard does not mandate one or the
> other, and most clients don't do this if port == 80, but wget for
> instance does.
> My solution is to check if there is a trailing :80 in HTTP_HOST and then
> use an other rewrite rule.
>
>
> cheers,
> oliver

Adding VirtualHostRoot to the rewrite rule didn't change anything

Removing the trailing :80 in HTTP_HOST lets any registrated user access the
site but most of them have to login twice.
Removing the trailing :80 in HTTP_HOST also blocked the entrance to the ZMI
trough apache

Does Apache require the registratition of my Zope users somewhere (read an
article about conflicting apache & Zope users, but didn't understand how
to)?

In http://www.zope.org/Members/shaw/HowTo/ApacheFrontEnd it is also stated
that the order of installing/configuring things is important but then again
I got no clue where everything went wrong.

All I need is this

When someone enters http://mysite/CMF-site it is resolved by Apache in
http://mysite:8080/CMF-site without showing the redirected port to the user.

<VirtualHost 111.111.111.111>
ServerName www.mysite.com
RewriteEngine On
RewriteRule ^/Zope/(.*) /home/zope/2-5-1/Zope.cgi/$1
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
RewriteRule ^/(.*)
http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}:80/VirtualHostRoot/$
1 [L,P]
</VirtualHost>

Apparantly this doesn't resolve it, although it used to do the right thing