Welcome! Log In Create A New Profile

Advanced

how to proxy pass one jsp dir that under a static web to tomcat:8080 ?

November 30, 2009 06:03AM
at first , thank you very much for helping me !
and now I have a new problem ,
I have a new server , totally , this is a static website , but one dir is jsp , so my head turn bigger ...
the web works ok but this jsp dir
this is my conf ,
-------------------------------
server {
listen 80;
server_name aaa.aaa.com;
error_page 404 http://aaa.aaa.com/error/error.html;
location / {
root /web/htdocs;
index index.htm index.html index.jsp;
ssi on;
ssi_silent_errors on;
ssi_types text/shtml;
}
location /status {
stub_status on;
auth_basic "NginxStatus";
allow 111.111.111.0/24;
}
location ~ .*\.(jsp|do|action)$ {
root /web/htdocs/jsp/;
proxy_pass http://localhost:8080 ;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
location /servlet/ {
root /web/htdocs/jsp/;
proxy_pass http://localhost:8080 ;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
location /error.html {
root /web/htdocs/error/;
}
Subject Author Posted

how to proxy pass one jsp dir that under a static web to tomcat:8080 ?

rollingsun November 30, 2009 06:03AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready