I'm running several Tomcat 7 instances. Proxying was fairly easy though HTTP/1.1 with persistent connection took a bit to get right (use the debug error log to find out).
Here's part of my configuration:
http {
upstream tomcat3 {
server 127.0.0.1:8081;
keepalive 1;
}
}
server {
listen [::]:81;
server_name fnuh.com;
root /var/www/$host;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://tomcat3;
proxy_pass_header server;
gzip_vary off;
}
}