resin + nginx

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 4 版破解方法。

how to crack resin 4.

工具:jd http://java.decompiler.free.fr/

利用jd打开resin 4目录下的lib/pro.jar

将源代码另存出来。再用eclipse打开LicenseStore.java

查找init()函数,将init()函数中的

/*  69 */     this._personalCount;

/*  70 */     this._professionalCount;

改为

/*  69 */     this._personalCount = 100;

/*  70 */     this._professionalCount = 100;

 

然后编译为class文件,用winrar将class文件加入到lib/pro.jar,覆盖原来的文件。

即可。

验证:运行 resin,在浏览器中打开http://127.0.0.1:8080/resin-admin。破解版是有图表的。

 

 

resin 3.1.xx版破解方法。

工具:jd http://java.decompiler.free.fr/

利用jd打开resin 3.1.xx目录下的lib/license.jar

将源代码另存出来。再用eclipse打开LicenseStore.java

查找init()函数,将init()函数中的

this._serverCount;

改为

this._serverCount = 100;

然后编译为class文件,用winrar将class文件加入到lib/license.jar,覆盖原来的文件。

即可。

验证:运行 resin,在浏览器中打开http://127.0.0.1:8080/resin-admin,查看config,看到connection-max为1048576,即破解成功。

 

TCP ports

hmux://127.0.0.1:6800
accept-thread-min 5 keepalive-max 128
accept-thread-max 10 keepalive-select-max -1
accept-listen-backlog 100 keepalive-timeout 15000
connection-max 1048576 socket-timeout 65000
keepalive-connection-time-max 600000 suspend-time-max 600000
http://*:8080
accept-thread-min 5 keepalive-max 128
accept-thread-max 10 keepalive-select-max -1
accept-listen-backlog 100 keepalive-timeout 15000
connection-max 1048576 socket-timeout 65000
keepalive-connection-time-max 600000 suspend-time-max 600000