[Zope-CMF] problem with CMF & Apache proxy

Daniel Yu speed@etang.com
Wed, 6 Feb 2002 18:04:00 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C1AF38.A7B57140
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi, all,
 
I have a problem with Apache proxy and Zope CMF. Here is my
configuration and problem.
 
Configuration:
OS: Redhat 7.2
Zope: 2.5.0 Linux binary 1/25/02
CMF: 1.2 final release
Apache: 1.3.23 w/ mod_proxy and mod_rewrite
I have virtual host monster installed in Zope root directory, which
handles all virtual hosts in my Zope server. All virtual hosts works
fine except the CMF site.
Here is my apache httpd.conf virtual host section.
 
<VirtualHost *>
    ServerName www.somesite.com
    ErrorLog /var/log/httpd/somesite_error_log
    CustomLog /var/log/httpd/somesite_access_log combined
    RewriteEngine On
    RewriteRule /(.*)
http://localhost:8080/VirtualHostBase/http/www.somesite.com:80/somesite/
VirtualHostRoot/$1 [P]
</VirtualHost>

The problem is when I signed in CMF site as any member via virtual host,
it returns sign-in successful. However, when I click links like my
preference, it asks me to log in again. I checked the system variables
using <dtml-var REQUEST> and found the following info,
__ac_name cookie is set correctly with username
__ac cookie is not set
AUTHENTICATED_USER remains Anonymous
If I use direct connection to Zope server which is at port 8080, __ac
cookie and AUTHENTICATED_USER is correct. This is really weird. Does
anybody have any idea?
 
Daniel
 

------=_NextPart_000_0000_01C1AF38.A7B57140
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2712.300" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial size=3D2>Hi,=20
all,</FONT></SPAN></DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial size=3D2>I have =
a problem=20
with Apache proxy and Zope CMF. Here is my configuration and=20
problem.</FONT></SPAN></DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial=20
size=3D2>Configuration:</FONT></SPAN></DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial size=3D2>OS: =
Redhat=20
7.2</FONT></SPAN></DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial size=3D2>Zope: =
2.5.0 Linux=20
binary 1/25/02</FONT></SPAN></DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial size=3D2>CMF: =
1.2 final=20
release</FONT></SPAN></DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial =
size=3D2>Apache: 1.3.23 w/=20
mod_proxy and mod_rewrite</FONT></SPAN></DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial size=3D2>I have =
virtual host=20
monster installed in Zope root directory, which handles all virtual =
hosts in my=20
Zope server. All virtual hosts works fine except the CMF=20
site.</FONT></SPAN></DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial size=3D2>Here =
is my apache=20
httpd.conf virtual host section.</FONT></SPAN></DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial =
size=3D2>&lt;VirtualHost=20
*&gt;<BR>&nbsp;&nbsp;&nbsp; ServerName <A=20
href=3D"http://www.somesite.com">www.somesite.com</A><BR>&nbsp;&nbsp;&nbs=
p;=20
ErrorLog /var/log/httpd/somesite_error_log<BR>&nbsp;&nbsp;&nbsp; =
CustomLog=20
/var/log/httpd/somesite_access_log combined<BR>&nbsp;&nbsp;&nbsp; =
RewriteEngine=20
On<BR>&nbsp;&nbsp;&nbsp; RewriteRule /(.*) <A=20
href=3D"http://localhost:8080/VirtualHostBase/http/www.somesite.com:80/so=
mesite/VirtualHostRoot/$1">http://localhost:8080/VirtualHostBase/http/www=
.somesite.com:80/somesite/VirtualHostRoot/$1</A>=20
[P]<BR>&lt;/VirtualHost&gt;<BR></DIV></FONT></SPAN>
<DIV><SPAN class=3D885584922-06022002><FONT face=3DArial size=3D2>The =
problem is when=20
I signed in CMF site as any member via virtual host, it returns sign-in=20
successful. However, when&nbsp;I click links like my preference, it asks =
me to=20
log in again. I checked the system variables using &lt;dtml-var =
REQUEST&gt; and=20
found the following info,</FONT></SPAN></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D885584922-06022002>__ac_name=20
cookie is set correctly with username</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D885584922-06022002>__ac cookie is=20
not set</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D885584922-06022002>AUTHENTICATED_USER remains=20
Anonymous</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D885584922-06022002>If I use=20
direct connection to Zope server which is at port 8080, __ac cookie and=20
AUTHENTICATED_USER is correct. This is really weird. Does anybody have =
any=20
idea?</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D885584922-06022002></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D885584922-06022002>Daniel</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D885584922-06022002></SPAN><SPAN=20
class=3D885584922-06022002>&nbsp;</DIV></SPAN></FONT></FONT></BODY></HTML=
>

------=_NextPart_000_0000_01C1AF38.A7B57140--