nginx反向代理去除tomcat项目名
server {
listen 80;
server_name crm.xxx.net;
location / {
proxy_pass http://192.168.1.216/crm/;
proxy_cookie_path /crm/ /;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /crm/{
proxy_pass http://192.168.1.216/crm/;
proxy_cookie_path /crm/ /;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}