download the upstream jvm route from http://code.google.com/p/nginx-upstream-jvm-route/
[root@web1 nginx-1.2.0]# tar -zxf nginx-upstream-jvm-route-0.1.tar.gz
[root@web1 nginx-1.2.0]# patch -p0 ./nginx_upstream_jvm_route/jvm_route.patch
[root@web1 nginx-1.2.0]# ./configure –sbin-path=/usr/sbin/ –conf-path=/etc/nginx/nginx.conf –with-http_stub_status_module –with-http_ssl_module –add-module=./nginx_upstream_jvm_route
edit /etc/nginx/nginx.conf
add
upstream resin_proxy {
server 127.0.0.1:85 srun_id=app-by1 max_fails=2 fail_timeout=10s weight=200; //负载均衡
server web3:85 srun_id=app-by2 max_fails=2 fail_timeout=10s weight=200; //负载均衡
jvm_route $cookie_JSESSIONID|sessionid;
}
server {
listen 80;
server_name default yourhosts;
location / {
proxy_pass http://resin_proxy;
include proxy.conf;
index index.jsp index.html index.htm;
}
}
create proxy.conf
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
老大,你好几个月没有制作resin pro的crack文件了,期待您能抽空做一个啊!
resin 4.0.27和3.1.12发布很久了!
谢谢!