./configure \--prefix=/usr/nginx \--sbin-path=/usr/sbin/nginx \--conf-path=/etc/nginx/nginx.conf \--error-log-path=/tmp/nginx/log/error.log \--pid-path=/tmp/nginx/nginx.pid \--user=lpf \--group=lpf \--with-http_ssl_module \--with-http_flv_module \--with-http_gzip_static_module \--http-log-path=/tmp/nginx/access.log \--http-client-body-temp-path=/tmp/nginx/client \--http-proxy-temp-path=/tmp/nginx/proxy \--http-fastcgi-temp-path=/tmp/nginx/fcgi \--with-http_stub_status_module \--add-module=/home/lpf/nginx_upstream_jvm_route
nginx 安装 nginx-upstream-jvm-route,nginx-sticky-module ,最高必须为1.4.7, nginx-upstream-jvm-route必须去
svn checkout nginx-upstream-jvm-route-read-only 下载才可以。
cd nginx-0.7.59 # or whatever
patch -p0 < /path/to/this/directory/jvm_route.patch
nginx 需要zlib,openssl,pcre模块yum -y install gcc gcc-c++ autoconf automake
yum -y install zlib zlib-devel openssl openssl-devel pcre-develnginx 端口转发
server {
listen 80;
server_name localhost;
location / {
proxy_pass http:
//ip
:8081;
proxy_set_header Host $host:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}