nginx 80(php/html..)+iis88(asp+aspx…)+resin8080(java)完美组合(转)
#asp(aspx)支持,将客户端的请求转交给IISlocation ~* \.(asp|aspx|asa)$ {
root /host/wwwroot/www;
index index.asp index.aspx;
proxy_pass http://127.0.0.1:88/;
proxy_set_header X-Real-IP $remote_addr;
}
#java(jsp)支持,将客户端的请求转交给resin
location ~* \.(jsp|do)$ {
root /host/wwwroot/www;
index index.jsp index.do;
proxy_pass http://127.0.0.1:8080/;
proxy_set_header X-Real-IP $remote_addr;
}
#将客户端的请求转交给fastcgi
location ~ .*\.(php|php5|php4|shtml|xhtml|phtml|htm|html|shtml|shtm)?$ {
fastcgi_pass 127.0.0.1:9000;
include /host/nginx/conf/fastcgi_params;
}
目的是借助nginx的处理能力把php和静态等页面交给nginx处理,iis只负责处理asp和aspx相关内容,resin只处理java相关内容,所有内容从nginx 80端口输出
页:
[1]