Is there any equivalent mod_proxy for tomcat?
I'm trying to run a modified JWChat (simple javascript based jabber client) on tomcat 5.5. This app is ajax based and uses http binding to communicate with jabber server (I am using openfire). When running on the apache server it needs to redirect requests to http-bind using mod_proxy and it works. Is there an alternative to do the same on tomcat? I tried UrlRewriteFilter until no luck.
0
a source to share
2 answers
You can always put apache transparent proxy in front of your web application. It has additional benefits like caching, rewriting, load balancing, virtual host management, etc. Not to say that Tomcat can't do it, it's just that apache is well-versed in these things and well-documented.
It's much easier than you think, you can even combine it with your rewrite
# Proxy and Caching. Only proxy dynamic documents if this
# is the application server (or we waste disk space).
# [L] = Last rule [P] = Proxy
RewriteEngine On
RewriteRule \.(css|js|pdf|gif|jpg|png|swf|mp4|zip|exe)$ - [L]
RewriteRule (.*) http://www.yoursite.com:8000$1 [P]
CacheRoot "/var/www/cache/www.yoursite.com"
CacheSize 2000000
0
a source to share