[Zope] Apache, mod_rewrite, https working together?
tomc@evetcia.com
tomc@evetcia.com
Tue, 12 Jun 2001 10:50:13 +1000
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C0F2D9.A3E60640
Content-Type: text/plain
I dont do exactly what you are looking for but I do do this:
RewriteEngine on
RewriteRule ^/(.*)
http://localhost:8080/zopefolder/$1?REAL_HOST=%{HTTP_HOST} [QSA,P]
ProxyPass /misc_ http://localhost:8080/misc_
ProxyPass /p_ http://localhost:8080/p_
Notice that I am passing the HTTP_HOST variable through as a query string
append. I do this because it is the only way (that I know of) to pass client
info to Zope. I then call it as I would any other zope variable. of course
you could do the same for IP or any other similar variable.
Hope this helps.
Tom
=> -----Original Message-----
=> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On
=> Behalf Of Jim
=> Penny
=> Sent: Tuesday, 12 June 2001 10:33 AM
=> To: zope@zope.org
=> Subject: [Zope] Apache, mod_rewrite, https working together?
=>
=>
=> One of the strengths of the mod_proxy solution is that
=> it it possible to use apache-ssl to convert https
=> requests to http.
=>
=> But, that comes with the cost that it is quite difficult
=> for the Zope server to know the actual remote IP.
=>
=> It would be nice to be able to use the E=... flag setting
=> of the RewriteRule to set the REMOTE_ADDR to something
=> visible to Zope.
=>
=> Has anyone used mod_rewrite directives to proxy an https
=> request onto an http zope site? Does the E= flag permit
=> forwarding the REMOTE_ADDR?
=>
=> Thanks
=>
=> Jim Penny
=>
=> _______________________________________________
=> Zope maillist - Zope@zope.org
=> http://lists.zope.org/mailman/listinfo/zope
=> ** No cross posts or HTML encoding! **
=> (Related lists -
=> http://lists.zope.org/mailman/listinfo/zope-announce
=> http://lists.zope.org/mailman/listinfo/zope-dev )
=>
------_=_NextPart_001_01C0F2D9.A3E60640
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Zope] Apache, mod_rewrite, https working together?</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>I dont do exactly what you are looking for but I do =
do this:</FONT>
</P>
<P><FONT SIZE=3D2>RewriteEngine on</FONT>
<BR><FONT SIZE=3D2>RewriteRule ^/(.*) <A =
HREF=3D"http://localhost:8080/zopefolder/$1?REAL_HOST=3D%" =
TARGET=3D"_blank">http://localhost:8080/zopefolder/$1?REAL_HOST=3D%</A>{=
HTTP_HOST} [QSA,P]</FONT>
<BR><FONT SIZE=3D2>ProxyPass /misc_ <A =
HREF=3D"http://localhost:8080/misc_" =
TARGET=3D"_blank">http://localhost:8080/misc_</A></FONT>
<BR><FONT SIZE=3D2>ProxyPass /p_ <A HREF=3D"http://localhost:8080/p_" =
TARGET=3D"_blank">http://localhost:8080/p_</A></FONT>
</P>
<P><FONT SIZE=3D2>Notice that I am passing the HTTP_HOST variable =
through as a query string append. I do this because it is the only way =
(that I know of) to pass client info to Zope. I then call it as I would =
any other zope variable. of course you could do the same for IP or any =
other similar variable.</FONT></P>
<P><FONT SIZE=3D2>Hope this helps.</FONT>
</P>
<P><FONT SIZE=3D2>Tom</FONT>
</P>
<P><FONT SIZE=3D2>=3D> -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>=3D> From: zope-admin@zope.org [<A =
HREF=3D"mailto:zope-admin@zope.org">mailto:zope-admin@zope.org</A>]On =
</FONT>
<BR><FONT SIZE=3D2>=3D> Behalf Of Jim</FONT>
<BR><FONT SIZE=3D2>=3D> Penny</FONT>
<BR><FONT SIZE=3D2>=3D> Sent: Tuesday, 12 June 2001 10:33 AM</FONT>
<BR><FONT SIZE=3D2>=3D> To: zope@zope.org</FONT>
<BR><FONT SIZE=3D2>=3D> Subject: [Zope] Apache, mod_rewrite, https =
working together?</FONT>
<BR><FONT SIZE=3D2>=3D> </FONT>
<BR><FONT SIZE=3D2>=3D> </FONT>
<BR><FONT SIZE=3D2>=3D> One of the strengths of the mod_proxy =
solution is that</FONT>
<BR><FONT SIZE=3D2>=3D> it it possible to use apache-ssl to convert =
https</FONT>
<BR><FONT SIZE=3D2>=3D> requests to http.</FONT>
<BR><FONT SIZE=3D2>=3D> </FONT>
<BR><FONT SIZE=3D2>=3D> But, that comes with the cost that it is =
quite difficult</FONT>
<BR><FONT SIZE=3D2>=3D> for the Zope server to know the actual =
remote IP.</FONT>
<BR><FONT SIZE=3D2>=3D> </FONT>
<BR><FONT SIZE=3D2>=3D> It would be nice to be able to use the =
E=3D... flag setting</FONT>
<BR><FONT SIZE=3D2>=3D> of the RewriteRule to set the REMOTE_ADDR to =
something</FONT>
<BR><FONT SIZE=3D2>=3D> visible to Zope.</FONT>
<BR><FONT SIZE=3D2>=3D> </FONT>
<BR><FONT SIZE=3D2>=3D> Has anyone used mod_rewrite directives to =
proxy an https</FONT>
<BR><FONT SIZE=3D2>=3D> request onto an http zope site? Does =
the E=3D flag permit</FONT>
<BR><FONT SIZE=3D2>=3D> forwarding the REMOTE_ADDR?</FONT>
<BR><FONT SIZE=3D2>=3D> </FONT>
<BR><FONT SIZE=3D2>=3D> Thanks</FONT>
<BR><FONT SIZE=3D2>=3D> </FONT>
<BR><FONT SIZE=3D2>=3D> Jim Penny</FONT>
<BR><FONT SIZE=3D2>=3D> </FONT>
<BR><FONT SIZE=3D2>=3D> =
_______________________________________________</FONT>
<BR><FONT SIZE=3D2>=3D> Zope maillist - =
Zope@zope.org</FONT>
<BR><FONT SIZE=3D2>=3D> <A =
HREF=3D"http://lists.zope.org/mailman/listinfo/zope" =
TARGET=3D"_blank">http://lists.zope.org/mailman/listinfo/zope</A></FONT>=
<BR><FONT SIZE=3D2>=3D> ** No cross posts or HTML =
encoding! **</FONT>
<BR><FONT SIZE=3D2>=3D> (Related lists - </FONT>
<BR><FONT SIZE=3D2>=3D> <A =
HREF=3D"http://lists.zope.org/mailman/listinfo/zope-announce" =
TARGET=3D"_blank">http://lists.zope.org/mailman/listinfo/zope-announce</=
A></FONT>
<BR><FONT SIZE=3D2>=3D> <A =
HREF=3D"http://lists.zope.org/mailman/listinfo/zope-dev" =
TARGET=3D"_blank">http://lists.zope.org/mailman/listinfo/zope-dev</A> =
)</FONT>
<BR><FONT SIZE=3D2>=3D> </FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C0F2D9.A3E60640--