參考文檔:
http://www.cnblogs.com/xiangxiaodong/p/4080546.html
配置tomcat
配置nginx
upstream Vcooline{
server localhost:8080;
}
server {
listen 80;
server_name yuan.zihoo.cn;
root /progam/tomcat/webapps;
location /Vcooline {
index.html index.htm index.jsp index.htm;
proxy_pass http://Vcooline;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {
expires 30d;
}
location ~ .*\.(js|css)?$ {
expires 12h;
}
}
yuan.zihoo.cn使用ping命令解析到需要的主機(192.168.1.1)
tomcat的路徑root /progam/tomcat/webapps;