标签:nginx实现负载均衡
upstream nginx {
server 192.168.2.140:8080;
server 192.168.2.136:8080;
}location / {
proxy_pass #就是这一行,这里的nginx就是上面upstream 后面的nginx,这是一个名称,请保存两个
#地方是一致的
auth_basic off;
auth_basic_user_file /var/user;
root html;
index index.html index.htm;
}4.分别修改apache webapps/ROOT中的index.jsp,修改为简单的内容
<!-- tomcat1中的index.jsp --> <html> <h1>tomcat1</h1> </html> <!-- tomcat2中的index.jsp --> <html> <h1>tomcat2</h1> </html>
本文出自 “素颜” 博客,请务必保留此出处http://suyanzhu.blog.51cto.com/8050189/1944312
标签:nginx实现负载均衡
原文地址:http://suyanzhu.blog.51cto.com/8050189/1944312