nginx 反向代理

nginx 反向代理

vim nginx.conf
http {
.....
upstream "tomcatweb" {
server 172.30.13.199:8080;
server 172.30.13.100:8080;
}
server {
listen 80;
location / {
proxy_pass http://tomcatweb;
}
}
}

 

/usr/local/nginx/sbin/nginx -t
/usr/local/nginx/sbin/nginx -s stop
/usr/local/nginx/sbin/nginx

 

posted @ 2016-01-28 20:09  侠之大者kamil  阅读(204)  评论(0编辑  收藏  举报