yaoweibin / nginx_ajp_module

support AJP protocol proxy with Nginx
http://github.com/yaoweibin/nginx_ajp_module
246 stars 59 forks source link

Nginx ajp pass #16

Open firstsd opened 10 years ago

firstsd commented 10 years ago

I have a problem. How can I solve this problem.

My old server running successfully apache2+tomcat. Below config in my apache. Now I change nginx+tomcat. But JkUnmount command is not nginx.

My javascript files and some alias is working only nginx.


By default, all requests go to worker1

JkMount /* worker1

Serve js using httpd

JkUnMount /js/* worker1

Please assist me on this and advice me.

Thank you

firstsd commented 10 years ago

Now nginx config below.

upstream jbosspass { server 127.0.0.1:8009; jvm_route $cookie_JSESSIONID reverse; keepalive 10; }

server { listen 80; server_name webserver; charset utf-8;

    location / {
            ajp_keep_conn on;
            ajp_pass jbosspass;
    }
NOW I want no ajp pass below alias.
    location /codetariff {
            rewrite ^ http://webserver/index.html?mid=11;
    }

This /codetariff page is ajax & javascript. But this page working mistaken.