概述:
与整合Apache的思路都是类似的。(实质上整合PHP、Apache、Tomcat其实都是做反向代理。)
配置:
配置Nginx转发:
server {
listen 80;
server_name test.com www.test.com;
root /var/www/www.test.com;
index index.html index.htm index.php;
location ^~ /xxxxxxx{ //或者 location ~ \.(jsp|do)${
proxy_pass http://127.0.0.1:8088;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}