First understand what is Nginx:
http://cxshun.iteye.com/blog/1535188
Pictures from other deployment frameworks that can be learned from the entire cluster installation address: http://www.iteye.com/topic/1125301nginx Configuration After the problem:js,css,png ... Can't show it? 1, view page source code discovery: Read Js,css,png and other information, the system went to read the "http://tomcat_service/project name/css ..." Tomcat_service to configure the name of multiple servers, it is obviously wrong! repeatedly searched for "Nginx css,js,png cannot display" but did not get the answer, suddenly found:
- Location/{
- Proxy_pass http://tomcat_service
- Proxy_redirect default;
- Proxy_connect_timeout 10; (The timeout for connecting to the proxy server must be noted that the time out period cannot exceed 10 seconds.) When a server goes down, it is forwarded to another server in 10 seconds .
- }
No header format added above! as follows:
- Proxy_set_header X-real-ip $remote _addr;
- Client_max_body_size 100m;
Nginx memcache Tomcat Cluster load Balancing