You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jarecsni János <ja...@chello.hu> on 2002/02/14 16:24:22 UTC

cookies gone when proxying

Hi,

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:

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

    # Kills cookies...
    RewriteRule !^/istore(.*) - [C]
    RewriteRule (.*) http://bookline2/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
</VirtualHost>

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,
János


--
Jarecsni, János
MORGAN HILL CONSULTING, Internet Applications Unit
mailto:Jarecsni.Janos@morganhillconsulting.hu
http://morganhillconsulting.hu/ :: Phone+Fax: + 36 1 484 0392


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org