httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarecsni János <>
Subject FW: cookies gone when proxying
Date Thu, 14 Feb 2002 16:11:33 GMT

Sorry for posting this here, but i got no answer elsewhere.
Abstract: when I use pass-through (?) proxying in apache to itself (to
achive a 2nd round of processing a request) cookies are lost.

-------------- original letter:


on an Apache-Tomcat-JBoss stack I've run into the problem of URL rewriting.
The problem was that the rewritten URLs didn't get to Tomcat for dynamic
processing as they should have to. I tried proxying with charming results.
So the URL got rewritten AND the rewritten URL was passed to tomcat for
further processing (this is big thing because normally Apache would prepend
the document root directory name in front of the the resulting string and
would try to serve the request itself - with poor results in case the
requested "document" is a servlet or a JSP file.)

Here's the httpd.conf:

<VirtualHost bookstore>
    ServerName bookstore
    RewriteEngine n
    RewriteLogLevel 0
    RewriteLog rewrite.log

    # Kills cookies...
    RewriteRule !^/istore(.*) - [C]
    RewriteRule (.*) http://bookstore/istore$1 [P]

    DocumentRoot "f:/JBoss-2.4.4_Tomcat-4.0.2b/jboss/deploy/istore.war"
    Alias /istore "f:/JBoss-2.4.4_Tomcat-4.0.2b/jboss/deploy/istore.war"

    # configure mod_jk which resources to pass to tomcat for processing
    JkMount /istore/control/* ajp13
    JkMount /*.jsp ajp13

So I'd like Apache if the request URI does not start with "/istore" to
proxy-throughput the request to itself (to the same server) with the URL
corrected "/istore" inserted. It actually happens ok, but the cookies (which
are vital for session management) are gone. Why is it? It would be GREAT if
I could do proxying with cookies...

Thanks in advance,

Jarecsni, János
MORGAN HILL CONSULTING, Internet Applications Unit :: Phone+Fax: + 36 1 484 0392

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message