Ok. I find solution for rewriting:
in httpd.conf
<VirtualHost _default_:80>
RewriteEngine on
RewriteLog logs/proxy_rewrite.log
RewriteLogLevel 9
RewriteMap server rnd:rproxy.conf
RewriteRule^(http|https)://.*-[F]
RewriteRule^/(.*)$to://${server:web}/$1
RewriteRule^to://([^/]+)/(.*)
http:// $1/$2[P,L]
RewriteRule.*-[F]
ProxyRequestsOn
ProxyPassReverse /
http://server_1:8080/ ProxyPassReverse /
http://server2:8080/ </VirtualHost>
where rproxy.conf contains:
www server_1:8080|server_2:8080
but still I can not find the solutions with sessions. Each time mod_rewrite + rnd dispatches to a new server where no session received by previos login exist.Anyone can help?
Is it possible at all loadbalancing of servlet/jsp site to be done with Apache + mod_proxy + mod_rewrite?
[ July 10, 2003: Message edited by: Deyan Sultov ]