Help,
I have added the following lines in Apache's httpd.conf:
<VirtualHost *:80>
ServerName
www.myserver.com RewriteEngine on
RewriteMap server rnd:/rewrite/rproxy.conf
RewriteRule ^/(.*)$
to://${server:web|myserver:8080}/jmx-console RewriteRule ^to://([^/]+)/(.*)
http://$1/$2 [P,L]
RewriteRule .* - [F]
#ProxyRequests On
#ProxyPassReverse /
http://myserver:8080/jmx-console/ #ProxyPassReverse /
http://otherserver:8080/jmx-console/ #ProxyPassReverse /
http://someotherserver:8080/jmx-console/ </VirtualHost>
--------------
rproxy.conf
--------------
www myserver:8080|otherserver:8080|someotherserver:8080
I want:
1. When type in
www.myserver.com to be dispatched to one of the the backend servers.
The above mention code works fine. When I type
www.myserver.com I received
http://myserver:8080/jmx-console or
http://otherserver:8080/jmx-console or
http://someotherserver:8080/jmx-console 2.The real backend server hostname to be masked to
www.myserver.com. Unfortunately I can not achive this. If uncomment the Proxy directives Apache enters recursion.
http://www.myserver.com - > gets rewrited to
http://myserver:8080/jmx-console which is ProxyPassed to
http://www.myserver.com .. and so on..
how can I solve this problem
Thanks in advance
[ May 21, 2003: Message edited by: Deyan Sultov ]
[ May 21, 2003: Message edited by: Deyan Sultov ]