\n
\n 2014\/5\/8\n <\/div>\n
\n \u8bbe\u60f3\uff1a\u6bcf\u53f0\u670d\u52a1\u5668\u4e0a\u90fd\u90e8\u7f72\u76f8\u5173\u6a21\u5757\uff0c\u6bd4\u5982\u5728192.168.1.9\u4e0a\u90e8\u7f72\u6240\u6709\u6a21\u5757\uff0c\u4e0d\u540c\u7684\u6a21\u5757\u90e8\u7f72\u5230\u4e0d\u540c\u7684tomcat\u4e0a\u3002\u5047\u5982\u670910\u4e2a\u6a21\u5757\uff0c\u5219\u5206\u522b\u914d\u7f6e10\u4e2atomcat\uff0c\u4ed6\u4eec\u7684\u7aef\u53e3\u53f7\u5404\u4e0d\u76f8\u540c\u3002\u540c\u6837\u7684\uff0c\u5728\u5176\u4ed6\u670d\u52a1\u5668\u4e0a\u4e5f\u540c\u65f6\u90e8\u7f72\u76f8\u540c\u7684\u6a21\u5757\u3002\n <\/div>\n
\n \u4f7f\u7528nginx\u505a\u8d1f\u8f7d\u5747\u8861\u3002\n <\/div>\n
\n \n <\/div>\n
\n \u4e0b\u9762\u662f\u6211\u5199\u7684\u4e00\u4e2a\u5c0fdemo\u548c\u914d\u7f6e\u3002\n <\/div>\n
\n \u4e3a\u4e86\u662fUrl\u597d\u770b\u4e00\u70b9\uff0c\u6211\u5728host\u4e0a\u914d\u7f6e\u4e86\u5982\u4e0b\n <\/div>\n
\n 192.168.1.6 liuyiyou.com\n <\/div>\n
\n \n <\/div>\n
\n \u5728\u4e00\u53f0\u673a\u5668\u4e0a\u914d\u7f6e\u4e24\u4e2atomcat\u3002\u7aef\u53e3\u5206\u522b\u662f8080\uff0c9080.\n <\/div>\n
\n \u6bcf\u4e2atomcat\u4e0a\u90fd\u90e8\u7f72\u4e86\u4e00\u4e2a\u6a21\u5757test\u3002\u4e8b\u5b9e\u4e0a\uff0c\u4e24\u4e2a\u6a21\u5757\u5e94\u8be5\u5b8c\u5168\u76f8\u540c\u3002\u4f46\u662f\u4e3a\u4e86\u6d4b\u8bd5\u3002\u6211\u663e\u793a\u7684\u5185\u5bb9\u4e0d\u540c\u3002\u5176\u4e2d8080\u4e0a\u663e\u793a\u7684\u662f1\u800c8081\u4e0a\u663e\u793a\u7684\u662f2\n <\/div>\n
\n \n <\/div>\n
\n \u5728nginx\u4e0a\u505a\u5982\u4e0b\u914d\u7f6e\uff1a\n <\/div>\n
\n \n <\/div>\n
\n http {\n <\/div>\n
\n \n <\/div>\n
\n upstream test { \n <\/div>\n
\n #\u6839\u636eip\u8ba1\u7b97\u5c06\u8bf7\u6c42\u5206\u914d\u5404\u90a3\u4e2a\u540e\u7aeftomcat\uff0c\u8bb8\u591a\u4eba\u8bef\u8ba4\u4e3a\u53ef\u4ee5\u89e3\u51b3session\u95ee\u9898\uff0c\u5176\u5b9e\u5e76\u4e0d\u80fd\u3002 \n <\/div>\n
\n #\u540c\u4e00\u673a\u5668\u5728\u591a\u7f51\u60c5\u51b5\u4e0b\uff0c\u8def\u7531\u5207\u6362\uff0cip\u53ef\u80fd\u4e0d\u540c \n <\/div>\n
\n #ip_hash; \n <\/div>\n
\n server liuyiyou.com:9080; \n <\/div>\n
\n server liuyiyou.com:8080; \n <\/div>\n
\n } \n <\/div>\n
\n \n <\/div>\n
\n server {\n <\/div>\n
\n listen 80;\n <\/div>\n
\n server_name liuyiyou.com;\n <\/div>\n
\n #charset koi8-r;\n <\/div>\n
\n \n <\/div>\n
\n #access_log logs\/host.access.log main;\n <\/div>\n
\n \n <\/div>\n
\n \n <\/div>\n
\n \n <\/div>\n
\n location \/ {\n <\/div>\n
\n proxy_connect_timeout 3; \n <\/div>\n
\n proxy_send_timeout 30; \n <\/div>\n
\n proxy_read_timeout 30; \n <\/div>\n
\n proxy_pass http:\/\/test\/; \n <\/div>\n
\n }\n <\/div>\n
\n }\n <\/div>\n
\n \n <\/div>\n
\n }\n <\/div>\n
\n \u4e3b\u8981\u662fupstream\u4e2d\u7684\u914d\u7f6e\u3002\u8be5\u79cd\u914d\u7f6e\u4e0b\uff0c\u662f\u6309\u7167\u65f6\u95f4\u5206\u522b\u8bbf\u95ee\u4e0d\u540c\u7684\u6a21\u5757\n <\/div>\n
\n \u542f\u52a8\u4e24\u4e2atomcat\u3002\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\uff1ahttp:\/\/liuyiyou.com\/test\/index.jsp\n <\/div>\n
\n \u5219\u5206\u522b\u6253\u53701 \u548c2\n <\/div>\n
\n \u5047\u59821\u6b7b\u4e86\u3002\u5219\u76f4\u63a5\u6253\u53702\n <\/div>\n
\n \n <\/div>\n
\n \n <\/div>\n
\n \u5b9e\u9a8c\u6210\u529f\u540e\uff1a\n <\/div>\n
\n \n <\/div>\n
\n \u4e4b\u524d\uff1a\n <\/div>\n
\n 1\uff1a192.168.1.5 \u5df2\u542f\u52a8 lcp_server_5 \u767b\u5f55\u6a21\u5757\n <\/div>\n
\n 2\uff1a192.168.1.9 \u5df2\u542f\u52a8 lcp_server_3 \u641c\u7d22\u6a21\u5757\u548c\u7528\u6237\u4e2d\u5fc3\u6a21\u5757 \n <\/div>\n
\n 3\uff1a192.168.1.11 \u5df2\u542f\u52a8 lcp_server_1\n <\/div>\n
\n 3\uff1a192.168.1.10 \u5df2\u542f\u52a8 lcp_server_4 \u8d2d\u7269\u8f66\u6a21\u5757\n <\/div>\n
\n 3\uff1a192.168.1.12 \u5df2\u542f\u52a8 lcp_server_2 \n <\/div>\n
\n \n <\/div>\n
\n \u4fee\u6539\u540e\uff1a\n <\/div>\n
\n \u6bcf\u4e2a\u670d\u52a1\u5668\u4e0a\u90fd\u6709\u5168\u90e8\u7684\u6a21\u5757\u3002\n <\/div>\n
\n \u53ea\u662f\u4e0d\u540c\u7684\u6a21\u5757\u5bf9\u5e94\u4e0d\u540c\u7aef\u53e3\u7684tomcat\n <\/div>\n
\n \u8fd9\u6837\uff0c\u5176\u4e2d\u4e00\u53f0\u5b95\u673a\uff0c\u4efb\u7136\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee\u3002\n <\/div>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"nginx\u7b80\u5355\u7684\u5206\u5e03\u5f0f\u90e8\u7f72\u65b9\u68482014\/5\/8\u8bbe\u60f3\uff1a\u6bcf\u53f0\u670d\u52a1\u5668\u4e0a\u90fd\u90e8\u7f72\u76f8\u5173\u6a21\u5757\uff0c\u6bd4\u5982\u5728192.168.1.9\u4e0a\u90e8\u7f72\u6240\u6709\u6a21\u5757\uff0c\u4e0d\u540c\u7684\u6a21\u5757\u90e8\u7f72\u5230...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/366"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=366"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/366\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}