Nginx with tomcat

Does anyone know if nginx is possible to work with tomcat, tomcat as
somekind of a proxy back-end, similar idea to php-fastcgi?

I need to test something and I have it with apache, mod_jk and of course
tomcat and wanna change from apache to nginx, but dont know if possible.

Robert G. wrote:

Does anyone know if nginx is possible to work with tomcat, tomcat as
somekind of a proxy back-end, similar idea to php-fastcgi?

work excellently.

for example:

    location / {
        rewrite ^/$ /tomcatapp/    redirect;
    }

    location /tomcatapp {
        proxy_pass         http://localhost:9080/tomcatapp;
             <skip>
    }

or:
location / {
proxy_pass http://localhost:9080/tomcatapp;

}

Thanks, I will check it out.

On Fri, Aug 29, 2008 at 12:45:18PM +0300, Sergej Kandyla wrote:

   }

   location /tomcatapp {
       proxy_pass         http://localhost:9080/tomcatapp;
            <skip>
   }

or:
location / {
proxy_pass http://localhost:9080/tomcatapp;

Probably

  •         proxy_pass         http://localhost:9080/tomcatapp;
    
  •         proxy_pass         http://localhost:9080/tomcatapp/;