Nginx + Glassfish breaks HTTP Headers?

Sharkie Landshark lists at ruby-forum.com
Tue Aug 19 22:10:49 MSD 2008


I tried the following combinations

1) Nginx + Mongrel (MRI)
2) Nginx + Mongrel (Jruby)
3) Nginx + Glassfish Gem
4) Glassfish Gem

Basically for 1), 2) and 3) I use Nginx to service static files and
Mongrel/Glassfish to service rails with the following config

         proxy_set_header   Host             $host;
         proxy_set_header   X-Real-IP        $remote_addr;
         proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;

With 1), 2) and 4) everything works fine,

However things start to break when I do 3) which is putting Nginx in
front of Glassfish Gem.

There appears to be some redundant stuffing of HTTP Headers, which
breaks all Ajax requests. The regular HTTP Get request work fine though.

But, when I remove Nginx to access Glassfish directly, then things are
fine.

At this point, 3) is my preferred deployment because Glassfish appears
to not suffer from the memory leak that Mongrel (Jruby) does, and I need
Nginx to service all other requests on this machine.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list