Nginx:nginx-1.8.0.tar.gz
Tomcat:apache-tomcat-8.0.0-rc10.tar.gz
Client 192.168.52.40
Nginx192.168.52.73
Tomcat1192.168.52.65
Tomcat2192.168.52.67
#gzip on;
Upstream Tomcat_server {
Server 192.168.52.65:8080;
Server 192.168.52.67:8080;
Location/{
root HTML;
Index index.html index.htm;
Proxy_pass Http://tomcat_server;
}
If the following error occurs Upstream Misplaced , should be placed in http inside the module but must be in Server outside the module:
Nginx : [Emerg] "upstream" directive is not allowed herein/etc/nginx/nginx.conf
Tomcat : 650) this.width=650; "Width=" 213 "height=" "src="/e/u261/themes/default/images/sp Acer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; " alt= "Spacer.gif"/>
Create a new New directory, write a index.html
650) this.width=650; "Width=" 539 "height=" + src= "/e/u261/themes/default/images/spacer.gif" style= "Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
change the root directory of the access, insert the last sentence before </Host>
Build Nginx+tomcat Load Balancer