您的位置:首页 > 运维架构 > Tomcat

ngix配置

2016-01-04 11:55 609 查看
重启  ./nginx -s reload
service nginx restart


server {

listen 80;

server_name www.****.org ;

location / {     // 以/  开头的

root /usr/src/web/www/WebContent/page;

index index.jsp index.htm;

proxy_pass http://www..****..org:8001;//转向的地址
}

location  = / {     //等于
proxy_pass  http://www.****org/home/index;   


location ~* \.(txt|doc)$ {

root /usr/src/web/www;

 deny all;  //禁止访问

}

}

server {

listen 80;

server_name cms..****..org ;

location / {

proxy_pass http://cms..****..org:8002; //转向的地址

}

location ~* \.(txt|doc)$ {
root /usr/src/web/cms;

 deny all; 

}

}

tomcat 地址重写    

<Context docBase="D:\work\apache-tomcat-7.0.52\webapps\****" path="/*****" reloadable="true" />
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ngix tomcat