{"id":44596,"date":"2025-06-19T16:15:50","date_gmt":"2025-06-19T08:15:50","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/44596.html"},"modified":"2025-06-19T16:15:50","modified_gmt":"2025-06-19T08:15:50","slug":"%e9%ab%98%e6%80%a7%e8%83%bd-web-%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b9%8btengine","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/44596.html","title":{"rendered":"\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u4e4bTengine"},"content":{"rendered":"<h3>\u4e00\u3001\u6982\u8ff0<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081546-6853c732eee23.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u2003\u2003Tengine \u662f\u4e00\u4e2a\u7531\u6dd8\u5b9d\u7f51\u53d1\u8d77\u7684 Web \u670d\u52a1\u5668\u9879\u76ee\u3002\u5b83\u57fa\u4e8e Nginx \u7136\u540e\u9488\u5bf9\u5927\u8bbf\u95ee\u91cf\u7f51\u7ad9\u7684\u9700\u6c42&#xff0c;\u6dfb\u52a0\u4e86\u5f88\u591a\u9ad8\u7ea7\u529f\u80fd\u548c\u7279\u6027&#xff0c;\u4ece 2011 \u5e74 12 \u6708\u5f00\u59cb&#xff0c;Tengine \u6b63\u5f0f\u5f00\u6e90\u3002Tengine \u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u5df2\u7ecf100\u591a\u5bb6\u5927\u578b\u7f51\u7ad9\u5982\u6dd8\u5b9d\u7f51&#xff0c;\u5929\u732b\u5546\u57ce\u3001Youku\u3001AliExpress\u3001 Lazada \u3001Alibaba Cloud\u7b49\u5f97\u5230\u4e86\u751f\u4ea7\u578b\u68c0\u9a8c\u3002Tengine\u5b9a\u4f4d\u4e8e\u6253\u9020\u4e00\u4e2a\u9ad8\u6548\u3001\u7a33\u5b9a\u3001\u5b89\u5168\u3001\u6613\u7528\u7684 Web \u5e73\u53f0 \u76ee\u524d\u5df2100% \u517c\u5bb9 Nginx\u7684\u914d\u7f6e\u8bed\u6cd5\u548c\u6a21\u5757&#xff0c;\u7528\u6237\u8fd8\u53ef\u65e0\u7f1d\u8fc1\u79fb\u73b0\u6709Nginx\u670d\u52a1&#xff0c;\u540c\u65f6\u4eab\u53d7\u589e\u5f3a\u529f\u80fd&#xff0c;\u4f46\u9700\u8981\u6ce8\u610f\u5b89\u5168\u6f0f\u6d1e&#xff0c;\u8fd1\u671f\u5b89\u5168\u901a\u62a5\u663e\u793a\u90e8\u5206\u7248\u672c\u5b58\u5728\u6f0f\u6d1e&#xff0c;\u8bf7\u53ca\u65f6\u52a0\u56fa\u66f4\u65b0\u3002\u53e6\u5916&#xff0c;Tengine \u6ca1\u6709\u50cf Spring Cloud Gateway \u90a3\u6837\u4e3a\u5fae\u670d\u52a1\u67b6\u6784\u63d0\u4f9b\u539f\u751f\u652f\u6301&#xff08;\u6bd4\u5982\u76f4\u63a5\u4e0e Eureka\u3001Consul \u7b49\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6\u96c6\u6210&#xff09;&#xff0c;\u4f46 Tengine \u4ecd\u7136\u53ef\u4ee5\u901a\u8fc7 \u53cd\u5411\u4ee3\u7406\u7684\u65b9\u5f0f \u4e0e\u5fae\u670d\u52a1\u67b6\u6784\u7ec4\u5408\u4f7f\u7528&#xff0c;\u5c24\u5176\u662f\u5728 Kubernetes \u73af\u5883\u4e2d&#xff0c;\u901a\u8fc7 Ingress \u7684\u65b9\u5f0f\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861\u548c\u8def\u7531\u529f\u80fd\u3002<\/p>\n<ul>\n<li>\u7ee7\u627f Nginx-1.24.0 \u7684\u6240\u6709\u7279\u6027&#xff0c;100% \u517c\u5bb9 Nginx \u7684\u914d\u7f6e&#xff1b;<\/li>\n<li>\u52a8\u6001\u6a21\u5757\u52a0\u8f7d&#xff08;DSO&#xff09;\u652f\u6301\u3002\u52a0\u5165\u4e00\u4e2a\u6a21\u5757\u4e0d\u518d\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\u6574\u4e2a Tengine&#xff0c;\u652f\u6301\u52a8\u6001\u8c03\u6574 servers, locations and upstreams\u800c\u65e0\u9700 reloading \u6216restarting worker \u8fdb\u7a0b&#xff1b;<\/li>\n<li>\u652f\u6301HTTP\/3 (QUIC v1 \u548cdraft-29\u65b9\u5f0f)&#xff1b;\u652f\u6301\u5f02\u6b65SSL\/TLS\u6a21\u5f0f&#xff0c;\u53ef\u4ee5\u4f7f\u7528QAT&#xff08;intel QuickAssist Technology&#xff09;\u6765\u5378\u8f7d\u548c\u52a0\u901fSSL&#xff0c;\u663e\u8457\u63d0\u5347\u6027\u80fd\u3002<\/li>\n<li>\u652f\u6301\u57fa\u4e8e\u6807\u51c6\u548c\u81ea\u5b9a\u4e49\u7684 HTTP header, cookie, query and weights.\u6765\u52a8\u6001\u914d\u7f6e\u8def\u7531&#xff0c;\u53ef\u52a8\u6001\u6dfb\u52a0\u548c\u8ffd\u52a0\u81ea\u5b9a\u4e49\u7684http \u5934\u548c\u8bf7\u6c42\u53c2\u6570&#xff1b;\u65e0\u9700\u91cd\u65b0\u52a0\u8f7d\u5f15\u64ce\u7684\u5c31\u53ef\u5411HTTP\u54cd\u5e94\u6dfb\u52a0\u81ea\u5b9a\u4e49\u62a5\u5934&#xff1b;\u652f\u6301\u52a8\u6001\u914d\u7f6eTLS versions, timeout setting, SSL Redirects, CORS and enabling\/disabling robots for the server and location&#xff1b;\u652f\u6301proxy_connection\u7684\u96a7\u9053\u8fde\u63a5&#xff1b;<\/li>\n<li>\u66f4\u591a\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\u652f\u6301\u3002\u5982\u4f1a\u8bdd\u4fdd\u6301&#xff0c;\u4e00\u81f4\u6027 hash \u7b49&#xff1b;<\/li>\n<li>\u8f93\u5165\u8fc7\u6ee4\u5668\u673a\u5236\u652f\u6301\u3002\u901a\u8fc7\u4f7f\u7528\u8fd9\u79cd\u673a\u5236 Web \u5e94\u7528\u9632\u706b\u5899\u7684\u7f16\u5199\u66f4\u4e3a\u65b9\u4fbf&#xff1b;<\/li>\n<li>\u52a8\u6001\u811a\u672c\u8bed\u8a00 Lua \u652f\u6301\u3002\u6269\u5c55\u529f\u80fd\u975e\u5e38\u9ad8\u6548\u7b80\u5355&#xff1b;<\/li>\n<li>\u652f\u6301\u7ba1\u9053&#xff08;pipe&#xff09;\u548c syslog&#xff08;\u672c\u5730\u548c\u8fdc\u7aef&#xff09;\u5f62\u5f0f\u7684\u65e5\u5fd7\u4ee5\u53ca\u65e5\u5fd7\u62bd\u6837&#xff1b;<\/li>\n<li>\u7ec4\u5408\u591a\u4e2a CSS\u3001JavaScript \u6587\u4ef6\u7684\u8bbf\u95ee\u8bf7\u6c42\u53d8\u6210\u4e00\u4e2a\u8bf7\u6c42&#xff1b;<\/li>\n<li>\u53ef\u4ee5\u5bf9\u540e\u7aef\u7684\u670d\u52a1\u5668\u8fdb\u884c\u4e3b\u52a8\u5065\u5eb7\u68c0\u67e5&#xff0c;\u6839\u636e\u670d\u52a1\u5668\u72b6\u6001\u81ea\u52a8\u4e0a\u7ebf\u4e0b\u7ebf&#xff1b;<\/li>\n<li>\u81ea\u52a8\u6839\u636e CPU \u6570\u76ee\u8bbe\u7f6e\u8fdb\u7a0b\u4e2a\u6570\u548c\u7ed1\u5b9a CPU \u4eb2\u7f18\u6027&#xff1b;\u652f\u6301\u5185\u6838\u65c1\u8def\u7684\u9ad8\u901fUDP\u4f20\u8f93&#xff0c;<\/li>\n<li>\u76d1\u63a7\u7cfb\u7edf\u7684\u8d1f\u8f7d\u548c\u8d44\u6e90\u5360\u7528\u4ece\u800c\u5bf9\u7cfb\u7edf\u8fdb\u884c\u4fdd\u62a4&#xff0c;\u5305\u62ec&#xff1a; asynchronous log &amp; rollback, DNS caching, memory usage&#xff1b;<\/li>\n<li>\u663e\u793a\u5bf9\u8fd0\u7ef4\u4eba\u5458\u66f4\u53cb\u597d\u7684\u51fa\u9519\u4fe1\u606f&#xff0c;\u4fbf\u4e8e\u5b9a\u4f4d\u51fa\u9519\u673a\u5668&#xff1b;<\/li>\n<li>\u66f4\u5f3a\u5927\u7684\u9632\u653b\u51fb&#xff08;\u8bbf\u95ee\u901f\u5ea6\u9650\u5236&#xff09;\u6a21\u5757&#xff1b;<\/li>\n<li>\u66f4\u65b9\u4fbf\u7684\u547d\u4ee4\u884c\u53c2\u6570&#xff0c;\u5982\u5217\u51fa\u7f16\u8bd1\u7684\u6a21\u5757\u5217\u8868\u3001\u652f\u6301\u7684\u6307\u4ee4\u7b49&#xff1b;<\/li>\n<li>\u53ef\u4ee5\u6839\u636e\u8bbf\u95ee\u6587\u4ef6\u7c7b\u578b\u8bbe\u7f6e\u8fc7\u671f\u65f6\u95f4&#xff1b;<\/li>\n<li>\u652f\u6301\u76f4\u63a5\u63d0\u4ea4\u672a\u7f13\u51b2\u7684\u6570\u636e\u7ed9\u5230HTTP\u548cFastCGI \u540e\u7aef\u670d\u52a1\u5668&#xff0c;\u907f\u514d\u4e86\u672c\u5730\u7f13\u51b2\u9700\u5148\u5c06\u6587\u4ef6\u6570\u636e\u5199\u5165\u78c1\u76d8\u7f13\u51b2\u533a&#xff0c;\u7136\u540e\u518d\u4ece\u7f13\u51b2\u533a\u8bfb\u53d6\u6570\u636e\u8fdb\u884c\u5904\u7406&#xff0c;\u8fd9\u6837\u53ef\u4ee5\u51cf\u5c11\u78c1\u76d8I\/O\u64cd\u4f5c&#xff0c;\u63d0\u9ad8\u6587\u4ef6\u5904\u7406\u901f\u5ea6&#xff1b;<\/li>\n<\/ul>\n<p>\u5173\u8054\u8d44\u6e90&#xff1a;tengine\u4ed3\u5e93\u3001tengine\u4ea7\u54c1\u5b98\u7f51\u3001tengine-ingress\u7edf\u4e00\u63a5\u5165[Tengine-Ingress\u7ed3\u675f](https:\/\/mp.weixin.qq.com\/s\/VbNXHvjdCD07LOXaOIGXCw)<\/p>\n<h3>\u4e8c\u3001\u67b6\u6784\u53ca\u539f\u7406<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081547-6853c73307ee8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081547-6853c7338d5ce.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"1000\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081547-6853c733a3329.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"1000\" \/><\/p>\n<h4>2.1 tengine\u5bf9Nginx\u7684\u4e3b\u8981\u6539\u8fdb\u6a21\u5757<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081547-6853c733b3648.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"1000\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081547-6853c733c30db.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"1000\" \/><\/p>\n<h4>2.2 \u6539\u8fdb\u4f18\u5316<\/h4>\n<p>1&#xff09;\u8ba1\u65f6\u5668\u4f18\u5316<\/p>\n<p>Timers(\u8ba1\u65f6\u5668)\u662f\u7f51\u7edc\u670d\u52a1\u5668\u4e2d\u4e00\u4e2a\u5f88\u91cd\u8981\u7684\u57fa\u7840\u8bbe\u7f6e&#xff0c;\u5b83\u7528\u6765\u7ba1\u7406\u8bfb\u5199\u8d85\u65f6\u548c\u5e94\u7528\u903b\u8f91\u7684\u8d85\u65f6\u7b49\u3002\u5176\u5e38\u89c1\u64cd\u4f5c\u6709\u6dfb\u52a0\u8d85\u65f6\u3001\u5220\u9664\u8d85\u65f6\u4ee5\u53ca\u67e5\u627e\u6700\u5c0f\u7684\u8d85\u65f6\u503c\u3002Nginx\u4f7f\u7528Red-black tree(\u7ea2\u9ed1\u6811)\u4f5c\u4e3a\u5176\u8ba1\u65f6\u5668\u7684\u6570\u636e\u7ed3\u6784\u3002\u7ea2\u9ed1\u6811\u5bf9\u5e94\u4e8e\u6dfb\u52a0\u3001\u5220\u9664\u548c\u67e5\u627e\u6700\u5c0f\u503c\u7684\u7b97\u6cd5\u590d\u6742\u5ea6\u90fd\u662fO(logn)\u3002\u5728Tengine\u4e2d&#xff0c;\u6211\u4eec\u5c06Nginx\u7684\u8ba1\u65f6\u5668\u6570\u636e\u7ed3\u6784\u6539\u4e3a\u4e864-heap(\u56db\u53c9\u6700\u5c0f\u5806)\u3002\u56db\u53c9\u5806\u662f\u4e8c\u53c9\u5806\u7684\u53d8\u79cd&#xff0c;\u6bd4\u4e8c\u53c9\u5806\u6709\u66f4\u6d45\u7684\u6df1\u5ea6\u548c\u66f4\u597d\u7684CPU Cache\u547d\u4e2d\u7387\u3002\u6700\u5c0f\u5806\u7684\u6dfb\u52a0\u3001\u5220\u9664\u7684\u590d\u6742\u5ea6\u548c\u7ea2\u9ed1\u6811\u4e00\u6837\u90fd\u662fO(log n)&#xff0c;\u4f46\u5728\u67e5\u627e\u6700\u5c0f\u503c\u65f6&#xff0c;\u5b83\u7684\u7b97\u6cd5\u590d\u6742\u5ea6\u662f0(1)&#xff0c;\u5373\u53ea\u8981\u53d6\u51fa\u5806\u9876\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\u5373\u53ef&#xff0c;\u56e0\u6b64\u6bd4Nginx\u7684\u7ea2\u9ed1\u6811\u66f4\u9002\u5408\u9891\u7e41\u83b7\u53d6\u6700\u5c0f\u503c\u7684\u573a\u666f&#xff0c;\u7279\u522b\u662f\u5728\u5904\u7406\u5927\u91cf\u8fde\u63a5\u65f6&#xff0c;\u7528\u6700\u5c0f\u5806\u6027\u80fd\u63d0\u5347\u6bd4\u8f83\u660e\u663e\u3002<\/p>\n<p>2&#xff09;\u6d4f\u89c8\u5668\u548c\u722c\u866b\u7684\u5224\u65ad\u4f18\u5316<\/p>\n<p>\u5224\u65ad\u6d4f\u89c8\u5668\u7684\u7c7b\u578b\u662fWeb\u670d\u52a1\u5668\u7684\u4e00\u4e2a\u5e38\u89c1\u9700\u6c42\u3002Nginx\u4e2d\u5224\u65ad\u6d4f\u89c8\u5668\u7684\u65b9\u6cd5\u662f\u5bf9\u5173\u6ce8\u7684\u6d4f\u89c8\u5668\u79cd\u7c7b\u5728User-Agent\u5934\u4e2d\u505a\u66b4\u529b\u67e5\u627e(strstr) \u3002strstr\u672c\u8eab\u7684\u7b97\u6cd5\u590d\u6742\u5ea6\u662f0(n<sup>2)&#xff0c;Nginx\u67e5\u627e\u7684\u662f\u591a\u4e2a\u4e32&#xff0c;\u56e0\u6b64\u5176\u6700\u7ec8\u7b97\u6cd5\u590d\u6742\u5ea6\u662f0(n<\/sup>3)\u3002\u968f \u7740\u73b0\u5728\u79fb\u52a8\u7aef\u7684\u6d4f\u89c8\u5668\u589e\u591a&#xff0c;\u539f\u6709\u6a21\u5757\u7684\u590d\u6742\u5ea6\u6210\u6307\u6570\u589e\u957f&#xff0c;\u6027\u80fd\u4e0d\u9ad8\u3002\u5728Tengine\u4e2d&#xff0c;\u6211\u4eec\u5f00\u53d1\u4e86\u4e00\u4e2a\u5168\u65b0\u7684user_agent\u6a21\u5757&#xff0c;\u4f7f\u7528\u4e86trie(\u524d\u7f00 \u6811)\u6765\u641c\u7d22\u591a\u4e2a\u53ef\u80fd\u7684\u6d4f\u89c8\u5668\u5339\u914d\u4e32\u3002\u5b83\u5c06\u6240\u6709\u7684\u5339\u914d\u5b57\u7b26\u4e32\u6784\u9020\u51fa\u4e00\u4e2a\u81ea\u52a8\u673a&#xff0c;\u6bcf\u6b21\u5339\u914d&#xff0c;\u5b83\u7684\u7b97\u6cd5\u590d\u6742\u5ea6\u53ea\u9700\u8981O(n)\u3002\u56e0\u6b64\u590d\u6742\u5ea6\u4e0d\u4f1a\u968f\u7740\u5339 \u914d\u4e32\u6570\u91cf\u7684\u589e\u52a0\u800c\u589e\u52a0\u3002<\/p>\n<p>3&#xff09;\u81ea\u52a8\u7ed1\u5b9aCPU\u4eb2\u7f18\u6027<\/p>\n<p>\u539f\u6709\u7684Nginx CPU\u7ed1\u5b9a\u9700\u8981\u624b\u5de5\u64cd\u4f5c&#xff0c;\u5728Tengine\u4e2d\u6211\u4eec\u5c06Worker\u8fdb\u7a0b\u548cCPU\u8fdb\u884c\u81ea\u52a8\u7ed1\u5b9a&#xff0c;\u53ef\u4ee5\u51cf\u5c11\u56e0CPU\u7684Cache\u5931\u6548\u5e26\u6765\u7684\u6027\u80fd\u635f\u5931&#xff0c;\u4ece\u800c\u63d0\u9ad8\u6027\u80fd\u3002\u53e6\u5916&#xff0c;\u8fd9\u6837\u4e5f\u51cf\u5c11\u4e86\u8fd0\u7ef4\u914d\u7f6e\u7684\u5de5\u4f5c\u91cf\u3002<\/p>\n<p>4&#xff09;Lua\u6a21\u5757(ngx_lua) \u5c06Lua\u76f4\u63a5\u5d4c\u5165\u8fdbNginx\u6838\u4e2d<\/p>\n<p>\u8fd9\u6837&#xff0c;\u501f\u52a9Lua\u7684\u534f\u7a0b\u548cNginx\u7684\u4e8b\u4ef6\u6a21\u578b\u5b9e\u73b0\u540c\u6b65\u3001\u975e\u963b\u585e\u7684I\/O\u64cd\u4f5c&#xff0c;\u5f00\u53d1\u8005\u5728Nginx\u914d\u7f6e\u6587\u4ef6\u4e2d\u53ef\u4e32\u884c\u540c\u6b65\u7f16\u5199Lua\u811a\u672c\u6765\u5904\u7406\u4e1a\u52a1\u903b\u8f91&#xff0c;\u65e2\u53ef\u4ee5\u7528\u5b83\u6765\u9ecf\u5408\u5404\u79cd\u4e0a\u6e38(Proxy\u3001Drizzle\u3001Redis\u3001Memcached\u7b49)\u7684\u8f93\u51fa&#xff0c;\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5b83\u7684Cosocket\u63a5\u53e3\u6765\u7f16\u5199\u8bbf\u95ee\u4e0a\u6e38\u7684\u5ba2\u6237\u7aef\u3002\u5f97\u76ca\u4e8eLua\u89e3\u91ca\u5668\u6781\u4f4e\u7684\u5f00\u9500\u548cJIT\u6280\u672f(LuaJIT)&#xff0c;\u7528\u6237\u4e0d\u7528\u7f16\u5199\u590d\u6742\u7684C\u6a21\u5757\u5c31\u80fd\u83b7\u5f97\u6781\u9ad8\u7684\u541e\u5410\u6027 \u80fd\u3002\u4e5f\u53ef\u4ee5\u52a8\u6001\u66f4\u6539\u903b\u8f91&#xff0c;\u4e0d\u7528\u518d\u91cd\u65b0\u7f16\u8bd1Nginx\u4ee3\u7801&#xff0c;\u4ece\u800c\u5e26\u6765\u4e86\u6781\u5927\u7684\u7075\u6d3b\u6027\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081547-6853c733d88b5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"1000\" \/><\/p>\n<p>Lua\u6a21\u5757\u5728\u521d\u59cb\u5316\u65f6\u4e3a\u6bcf\u4e2aNginx\u5de5\u4f5c\u8fdb\u7a0b\u521b\u5efa\u4e00\u4e2aLua\/LuaJIT\u5b9e\u4f8b(LuaVM)&#xff0c;\u540c\u4e00\u8fdb\u7a0b\u5904\u7406\u7684\u6240\u6709\u8bf7\u6c42\u5c06\u5171\u4eab\u8be5\u5b9e\u4f8b&#xff0c;\u5e76\u4e14Lua\u6a21\u5757\u5c06\u7528\u6237Lua\u4ee3\u7801\u5305\u88c5\u4e3a\u534f\u7a0b\u5de5\u5382\u7f13\u5b58\u5728Nginx\u5185&#xff0c;\u4e00\u4e2a\u8bf7\u6c42\u5230\u6765\u65f6\u534f\u7a0b\u5de5\u5382\u4e3a\u5b83\u5206\u914d\u4e00\u4e2a\u72ec\u7acb\u534f\u7a0b\u6765\u8fd0\u884c\u4e1a\u52a1\u903b\u8f91\u3002\u5728\u9700\u8981\u8fdb\u884c\u963b\u585e\u7684I\/O\u64cd\u4f5c\u65f6&#xff0c;Lua\u6a21\u5757\u81ea\u52a8\u5c06I\/O\u64cd\u4f5c\u59d4\u6258\u7ed9Nginx\u7684\u4e8b\u4ef6\u5904\u7406\u6a21\u578b&#xff0c;\u5e76\u4fdd\u5b58\u6b63\u5728\u8fd0\u884c\u7684\u534f\u7a0b\u4e0a\u4e0b\u6587&#xff0c;\u8fd4\u56de\u5230Nginx\u5de5\u4f5c\u8fdb\u7a0b\u4e2d\u5904\u7406\u5176\u4ed6\u8bf7\u6c42&#xff0c;\u7b49\u5230I\/O\u64cd\u4f5c\u5b8c\u6210\u65f6&#xff0c;\u53c8\u4f1a\u6062\u590d\u8be5\u534f\u7a0b\u7ee7\u7eed\u8fd0\u884c\u3002<\/p>\n<p>5&#xff09;\u52a8\u6001\u6a21\u5757\u652f\u6301<\/p>\n<p>Tengine\u4e2d\u52a0\u5165\u4e86\u52a8\u6001\u6a21\u5757\u529f\u80fd&#xff0c;\u5bf9\u6a21\u5757\u5b9e\u73b0\u4e86\u52a8\u6001\u7f16\u8bd1&#xff0c;\u52a0\u5165\u6a21\u5757\u4e0d\u518d\u9700\u8981\u9759\u6001\u7f16\u8bd1\u6574\u4e2aTengine\u4ee3\u7801\u3002\u4f7f\u7528\u65b9\u6cd5\u7c7b\u4f3cApache&#xff0c;\u5728\u4f7f\u7528\u65f6\u53ef\u4ee5\u5f53\u573a \u52a8\u6001\u7f16\u8bd1\u60f3\u52a0\u4eba\u7684\u6a21\u5757&#xff0c;\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<ul>\n<li>1.\u6211\u4eec\u63d0\u4f9b\u7c7b\u4f3capxs\u7684\u7f16\u8bd1\u5de5\u5177&#xff0c;\u5c06\u6a21\u5757\u7f16\u8bd1\u6210\u52a8\u6001\u94fe\u63a5\u5e93\u3002<\/li>\n<li>2.\u5728Tengine\u542f\u52a8\u65f6\u901a\u8fc7\u52a8\u6001\u94fe\u63a5\u5e93\u8bfb\u5165\u6a21\u5757\u7684\u6a21\u5757\u7ed3\u6784\u4f53&#xff0c;\u8fd9\u4e2a\u7ed3\u6784\u4f53\u5305\u542b\u4e86\u6a21\u5757\u5904\u7406\u7684\u6240\u6709\u4fe1\u606f\u3002<\/li>\n<li>3.Tengine\u6709\u5185\u7f6e\u7684\u6a21\u5757\u52a0\u8f7d\u987a\u5e8f\u8868&#xff0c;\u4e5f\u53ef\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u663e\u5f0f\u7684\u6307\u5b9a\u6a21\u5757\u7684\u52a0\u8f7d\u987a\u5e8f&#xff0c;\u4fdd\u8bc1\u6a21\u5757\u52a0\u8f7d\u987a\u5e8f\u6b63\u5e38\u3002<\/li>\n<li>4.Tengine\u5185\u90e8\u901a\u8fc7\u4e24\u4e2a\u7248\u672c\u53f7(Major\u548cMinor)\u6765\u63a7\u5236\u52a8\u6001\u94fe\u63a5\u5e93(.so\u6587\u4ef6)\u7684\u524d\u540e\u517c\u5bb9\u6027\u3002\u5f53Major\u7248\u672c\u53f7\u76f8\u540c\u65f6&#xff0c;\u8f83\u65b0\u7248\u672c\u7684Tengine\u517c\u5bb9\u8f83\u65e7\u7248\u672c\u7684.so\u6587\u4ef6(Tengine\u7684Minor\u5927\u4e8e.so\u6587\u4ef6)\u3002\u53ea\u6709\u5f53Tengine\u7684API\u53d1\u751f\u91cd\u5927\u53d8\u5316\u65f6&#xff0c;Major\u7684\u7248\u672c\u53f7\u624d\u53d1\u751f\u53d8\u5316\u3002\u589e\u52a0\u65b0\u7684API\u53ea\u4f1a\u589e\u52a0Minor\u7248\u672c\u53f7\u3002<\/li>\n<\/ul>\n<h4>2.3 Tengine-Ingress \u9ad8\u6027\u80fd\u9ad8\u53ef\u7528\u7684\u4e91\u539f\u751f\u7f51\u5173\u67b6\u6784<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081547-6853c733eb17b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"1000\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081548-6853c73475216.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"1000\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081548-6853c734bae99.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"1000\" \/><\/p>\n<h3>\u4e09\u3001\u90e8\u7f72\u914d\u7f6e<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081549-6853c7350c0b8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"1000\" \/><\/p>\n<h4>3.1 \u7f16\u8bd1\u5b89\u88c5<\/h4>\n<p>yum <span class=\"token parameter variable\">-y<\/span> <span class=\"token function\">install<\/span> gcc pcre-devel openssl-devel<br \/>\n<span class=\"token function\">useradd<\/span> <span class=\"token parameter variable\">-r<\/span> <span class=\"token parameter variable\">-s<\/span> \/sbin\/nologin nginx<br \/>\n<span class=\"token comment\">#\u4e0b\u8f7d\u6e90\u7801\u5305\u7f16\u8bd1<\/span><br \/>\n<span class=\"token builtin class-name\">cd<\/span> \/usr\/local\/src<br \/>\n<span class=\"token function\">wget<\/span> https:\/\/tengine.taobao.org\/download\/tengine-2.4.1.tar.gz<br \/>\nmd5sum tengine-2.4.1.tar.gz <span class=\"token comment\">#8a3c754741539723af977246dfb260dd<\/span><br \/>\n<span class=\"token function\">tar<\/span> xf tengine-2.4.1.tar.gz<br \/>\n<span class=\"token builtin class-name\">cd<\/span> tengine-2.4.1\/<br \/>\n<span class=\"token comment\">#\u6216<\/span><br \/>\n<span class=\"token function\">git<\/span> clone https:\/\/github.com\/alibaba\/tengine.git<br \/>\n<span class=\"token builtin class-name\">cd<\/span> tengine<\/p>\n<p>.\/configure <span class=\"token parameter variable\">&#8211;prefix<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/tengine-2.4.1 <span class=\"token parameter variable\">&#8211;user<\/span><span class=\"token operator\">&#061;<\/span>nginx <span class=\"token parameter variable\">&#8211;group<\/span><span class=\"token operator\">&#061;<\/span>nginx &#8211;with-http_ssl_module &#8211;with-http_v2_module &#8211;with-http_realip_module &#8211;with-http_stub_status_module &#8211;with-http_gzip_static_module &#8211;with-pcre<\/p>\n<p><span class=\"token function\">make<\/span> <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token function\">make<\/span> <span class=\"token function\">install<\/span><br \/>\n<span class=\"token function\">ln<\/span> <span class=\"token parameter variable\">-s<\/span> \/usr\/local\/tengine-2.4.1\/sbin\/* \/usr\/sbin\/<br \/>\n<span class=\"token comment\">#\u542f\u52a8<\/span><br \/>\nnginx<\/p>\n<p><span class=\"token comment\">#\u52a8\u6001\u6dfb\u52a0 Lua \u6a21\u5757<\/span><br \/>\nyum <span class=\"token parameter variable\">-y<\/span> <span class=\"token function\">install<\/span> lua-devel<br \/>\n.\/configure <span class=\"token parameter variable\">&#8211;prefix<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/tengine-2.4.1 <span class=\"token parameter variable\">&#8211;user<\/span><span class=\"token operator\">&#061;<\/span>nginx <span class=\"token parameter variable\">&#8211;group<\/span><span class=\"token operator\">&#061;<\/span>nginx &#8211;with-http_ssl_module &#8211;with-http_v2_module &#8211;with-http_realip_module &#8211;with-http_stub_status_module &#8211;with-http_gzip_static_module &#8211;with-pcre &#8211;with-http_lua_module<span class=\"token operator\">&#061;<\/span>shared<br \/>\n<span class=\"token comment\">#\u5c06\u52a8\u6001\u6a21\u5757\u7684so\u6587\u4ef6\u62f7\u8d1d\u5230\u76ee\u6807\u76ee\u5f55&#xff0c;\u8fd9\u4e2a\u76ee\u5f55\u53ef\u4ee5\u901a\u8fc7&#039;&#8211;dso-path&#039;\u8bbe\u7f6e\u3002\u9ed8\u8ba4\u662f\u5728Tengine\u5b89\u88c5\u76ee\u5f55\u4e0b\u9762\u7684modules\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">make<\/span> dso_install<br \/>\n<span class=\"token comment\">#\u6216\u5982\u4e0b\u8fd9\u6837\u7b80\u5316\u751f\u4ea7\u52a8\u6001\u6a21\u5757&#xff0c;&#8211;add-dynamic-module \u53c2\u6570\u7f16\u8bd1\u6a21\u5757<\/span><br \/>\n.\/configure &#8211;add-dynamic-module<span class=\"token operator\">&#061;<\/span>\/path\/to\/module<br \/>\n<span class=\"token function\">make<\/span> modules<br \/>\n<span class=\"token comment\">#\u66f4\u65b0\u914d\u7f6e\u6587\u4ef6\u4ee5\u52a0\u8f7d Lua \u6a21\u5757&#xff0c;\u751f\u6210\u7684\u52a8\u6001\u6a21\u5757\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e objs\/ \u76ee\u5f55\u4e0b<\/span><br \/>\n<span class=\"token function\">vim<\/span> \/usr\/local\/tengine-2.4.1\/conf\/nginx.conf <span class=\"token comment\">#\u5982\u4e0b\u6240\u793a<\/span><br \/>\ndso <span class=\"token punctuation\">{<\/span><br \/>\n    load ngx_http_lua_module.so<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\">#\u6216\u914d\u7f6e\u6587\u4ef6\u4e2d\u4f7f\u7528 load_module \u6307\u4ee4\u52a0\u8f7d\u6a21\u5757&#xff1a;<\/span><br \/>\nserver <span class=\"token punctuation\">{<\/span><br \/>\nlisten <span class=\"token number\">443<\/span> ssl http2<span class=\"token punctuation\">;<\/span>      <span class=\"token comment\"># \u542f\u7528 HTTP\/2<\/span><br \/>\n    server_name example.com<span class=\"token punctuation\">;<\/span><br \/>\nload_module modules\/ngx_http_lua_module.so<span class=\"token punctuation\">;<\/span><br \/>\nssl_certificate \/path\/to\/cert.pem<span class=\"token punctuation\">;<\/span><br \/>\n    ssl_certificate_key \/path\/to\/key.pem<span class=\"token punctuation\">;<\/span><\/p>\n<p>    location \/ <span class=\"token punctuation\">{<\/span><br \/>\n        root \/usr\/share\/nginx\/html<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\">#\u68c0\u67e5\u914d\u7f6e\u5e76\u91cd\u542f Tengine&#xff1a;<\/span><br \/>\nnginx <span class=\"token parameter variable\">-t<\/span><br \/>\nnginx <span class=\"token parameter variable\">-s<\/span> reload<\/p>\n<p><span class=\"token comment\">#Concat \u6a21\u5757&#xff1a;Concat \u6a21\u5757\u7528\u4e8e\u5408\u5e76\u591a\u4e2a\u6587\u4ef6\u5728\u4e00\u4e2a\u54cd\u5e94\u62a5\u6587\u4e2d&#xff0c;\u7c7b\u4f3c\u4e8e Apache \u7684 mod_concat \u6a21\u5757\u3002\u8fd9\u6709\u52a9\u4e8e\u51cf\u5c11 HTTP \u8bf7\u6c42\u6570\u91cf&#xff0c;\u63d0\u9ad8\u7f51\u7ad9\u52a0\u8f7d\u901f\u5ea6\u548c\u7528\u6237\u4f53\u9a8c<\/span><br \/>\n.\/configure <span class=\"token parameter variable\">&#8211;help<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> http_concat  <span class=\"token comment\">#\u68c0\u67e5\u5f53\u524dtengine\u652f\u6301\u7684Concat \u6a21\u5757\u7248\u672c<\/span><br \/>\n<span class=\"token comment\">#\u7f16\u8bd1<\/span><br \/>\n.\/configure <span class=\"token parameter variable\">&#8211;prefix<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/tengine-2.4.1 <span class=\"token parameter variable\">&#8211;user<\/span><span class=\"token operator\">&#061;<\/span>nginx <span class=\"token parameter variable\">&#8211;group<\/span><span class=\"token operator\">&#061;<\/span>nginx &#8211;with-http_ssl_module &#8211;with-http_v2_module &#8211;with-http_realip_module &#8211;with-http_stub_status_module &#8211;with-http_gzip_static_module &#8211;with-pcre &#8211;with-http_lua_module<span class=\"token operator\">&#061;<\/span>shared &#8211;with-http_concat_module<span class=\"token operator\">&#061;<\/span>shared<br \/>\n<span class=\"token function\">make<\/span> dso_install<br \/>\n<span class=\"token comment\">#\u5b8c\u6210\u540e&#xff0c;\u66f4\u65b0\u914d\u7f6e<\/span><br \/>\nlocation \/static\/css\/ <span class=\"token punctuation\">{<\/span><br \/>\n    concat on<span class=\"token punctuation\">;<\/span><br \/>\n    concat_max_files <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>location \/static\/js\/ <span class=\"token punctuation\">{<\/span><br \/>\n    concat on<span class=\"token punctuation\">;<\/span><br \/>\n    concat_max_files <span class=\"token number\">30<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\">#\u52a0\u8f7d<\/span><br \/>\nnginx <span class=\"token parameter variable\">-t<\/span><br \/>\nnginx <span class=\"token parameter variable\">-s<\/span> reload<\/p>\n<p><span class=\"token comment\">## \u67e5\u770b\u52a0\u8f7d\u6a21\u5757<\/span><br \/>\ntengine <span class=\"token parameter variable\">-V<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> dynamic<\/p>\n<h4>3.2 \u914d\u7f6e\u793a\u4f8b<\/h4>\n<p>worker_processes auto<span class=\"token punctuation\">;<\/span><br \/>\nworker_rlimit_nofile <span class=\"token number\">65535<\/span><span class=\"token punctuation\">;<\/span><br \/>\nevents <span class=\"token punctuation\">{<\/span><br \/>\n    worker_connections <span class=\"token number\">65535<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\nhttp <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token comment\">#\u4ee5\u5907\u65e5\u5fd7\u5207\u5272<\/span><br \/>\nlog_format main <span class=\"token string\">&#039;$remote_addr &#8211; $remote_user [$time_local] &#034;$request&#034; &#039;<\/span> <span class=\"token string\">&#039;$status $body_bytes_sent &#034;$http_referer&#034; &#039;<\/span>&#039; <span class=\"token string\">&#034;<span class=\"token variable\">$http_user_agent<\/span>&#034;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$http_x_forwarded_for<\/span>&#034;<\/span>&#039;<span class=\"token punctuation\">;<\/span><\/p>\n<p>access_log \/var\/log\/nginx\/access.log main<span class=\"token punctuation\">;<\/span><br \/>\ngzip_min_length 1k<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\"># \u8d1f\u8f7d\u5747\u8861&#xff0c;\u9ed8\u8ba4\u8f6e\u8be2&#xff1a;\u8bf7\u6c42\u88ab\u4f9d\u6b21\u5206\u914d\u7ed9\u6bcf\u4e2a\u670d\u52a1\u5668&#xff1b;IP \u54c8\u5e0c&#xff08;ip_hash&#xff09;&#xff1a;\u6839\u636e\u5ba2\u6237\u7aef IP \u5730\u5740\u5206\u914d\u6d41\u91cf&#xff0c;\u4f7f\u540c\u4e00 IP \u7684\u7528\u6237\u8bbf\u95ee\u540c\u4e00\u53f0\u670d\u52a1\u5668<\/span><br \/>\nupstream backend <span class=\"token punctuation\">{<\/span><br \/>\n    server <span class=\"token number\">172.18<\/span>.1.101:8080 <span class=\"token assign-left variable\">weight<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\"># \u6743\u91cd\u4e3a5<\/span><br \/>\n    server <span class=\"token number\">172.18<\/span>.1.102:8080 <span class=\"token assign-left variable\">weight<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">3<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\"># \u6743\u91cd\u4e3a3<\/span><br \/>\n    server <span class=\"token number\">172.18<\/span>.1.103:8080 backup<span class=\"token punctuation\">;<\/span>    <span class=\"token comment\"># \u5907\u7528\u670d\u52a1\u5668<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\">#\u6216<\/span><br \/>\nupstream backend <span class=\"token punctuation\">{<\/span><br \/>\n    ip_hash<span class=\"token punctuation\">;<\/span>                          <span class=\"token comment\"># \u542f\u7528 IP \u54c8\u5e0c<\/span><br \/>\n    server  <span class=\"token number\">172.18<\/span>.1.101:8080<span class=\"token punctuation\">;<\/span><br \/>\n    server  <span class=\"token number\">172.18<\/span>.1.102:8080<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n <span class=\"token comment\"># \u5f00\u542f\u5065\u5eb7\u68c0\u67e5,rise&#061;2&#xff1a;\u8fde\u7eed\u68c0\u67e5 2 \u6b21\u6210\u529f\u89c6\u4e3a\u5065\u5eb7;fall&#061;5&#xff1a;\u8fde\u7eed\u68c0\u67e5 5 \u6b21\u5931\u8d25\u89c6\u4e3a\u6545\u969c;timeout&#061;1000&#xff1a;\u68c0\u67e5\u8d85\u65f6\u65f6\u95f4&#xff08;\u5355\u4f4d\u6beb\u79d2&#xff09;;check_http_send&#xff1a;\u53d1\u9001\u7684 HTTP \u8bf7\u6c42\u5185\u5bb9;check_http_expect_alive&#xff1a;\u671f\u671b\u7684\u54cd\u5e94\u72b6\u6001\u7801\u3002<\/span><br \/>\n check <span class=\"token assign-left variable\">interval<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">3000<\/span> <span class=\"token assign-left variable\">rise<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span> <span class=\"token assign-left variable\">fall<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">5<\/span> <span class=\"token assign-left variable\">timeout<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1000<\/span> <span class=\"token assign-left variable\">type<\/span><span class=\"token operator\">&#061;<\/span>http<span class=\"token punctuation\">;<\/span><br \/>\n check_http_send <span class=\"token string\">&#034;HEAD \/ HTTP\/1.0<span class=\"token entity\" title=\"\\\\r\">\\\\r<\/span><span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span><span class=\"token entity\" title=\"\\\\r\">\\\\r<\/span><span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n check_http_expect_alive http_2xx http_3xx<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528\u8d1f\u8f7d\u5747\u8861<\/span><br \/>\nserver <span class=\"token punctuation\">{<\/span><br \/>\n    listen <span class=\"token number\">80<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    location \/ <span class=\"token punctuation\">{<\/span><br \/>\n        proxy_pass http:\/\/backend<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\">#waf\u793a\u4f8b<\/span><br \/>\nlocation \/ <span class=\"token punctuation\">{<\/span><br \/>\n    access_by_lua_block <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">#Lua \u811a\u672c\u5b9e\u73b0 WAF \u89c4\u5219<\/span><br \/>\n        <span class=\"token builtin class-name\">local<\/span> args <span class=\"token operator\">&#061;<\/span> ngx.req.get_uri_args<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> args<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;id&#034;<\/span><span class=\"token punctuation\">]<\/span> and tonumber<span class=\"token punctuation\">(<\/span>args<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;id&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">0<\/span> <span class=\"token keyword\">then<\/span><br \/>\n            ngx.exit<span class=\"token punctuation\">(<\/span><span class=\"token number\">403<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        end<br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\">#\u6d41\u91cf\u9650\u901f&#xff1a;\u9650\u5236\u6bcf\u4e2a IP \u7684\u5e76\u53d1\u8bf7\u6c42\u6570\u6216\u6bcf\u79d2\u8bf7\u6c42\u6570&#xff0c;\u9632\u6b62\u6076\u610f\u8bf7\u6c42\u6216\u6d41\u91cf\u7a81\u589e<\/span><br \/>\nhttp <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\"># \u5b9a\u4e49\u9650\u901f\u533a\u57df,$binary_remote_addr \u8868\u793a\u6839\u636e\u5ba2\u6237\u7aef IP \u5730\u5740\u9650\u901f,\u9650\u901f\u533a\u57df\u5927\u5c0f\u4e3a 10MB<\/span><br \/>\n    limit_req_zone <span class=\"token variable\">$binary_remote_addr<\/span> <span class=\"token assign-left variable\">zone<\/span><span class=\"token operator\">&#061;<\/span>req_zone:10m <span class=\"token assign-left variable\">rate<\/span><span class=\"token operator\">&#061;<\/span>10r\/s<span class=\"token punctuation\">;<\/span> <\/p>\n<p>    server <span class=\"token punctuation\">{<\/span><br \/>\n        listen <span class=\"token number\">80<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        location \/ <span class=\"token punctuation\">{<\/span><br \/>\n            limit_req <span class=\"token assign-left variable\">zone<\/span><span class=\"token operator\">&#061;<\/span>req_zone <span class=\"token assign-left variable\">burst<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\"># \u6bcf\u79d2\u9650\u5236 10 \u4e2a\u8bf7\u6c42&#xff0c;\u5141\u8bb8 5 \u4e2a\u7a81\u53d1\u8bf7\u6c42<\/span><br \/>\n            proxy_pass http:\/\/backend<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">#\u7f13\u5b58\u52a0\u901f:\u53ef\u4ee5\u5c06\u540e\u7aef\u670d\u52a1\u5668\u7684\u54cd\u5e94\u5b58\u50a8\u5230\u672c\u5730\u78c1\u76d8\u6216\u5185\u5b58\u4e2d&#xff0c;\u4ece\u800c\u52a0\u901f\u7528\u6237\u7684\u8bbf\u95ee<\/span><br \/>\nhttp <span class=\"token punctuation\">{<\/span><br \/>\n    proxy_cache_path \/var\/cache\/nginx <span class=\"token assign-left variable\">levels<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span>:2 <span class=\"token assign-left variable\">keys_zone<\/span><span class=\"token operator\">&#061;<\/span>my_cache:10m <span class=\"token assign-left variable\">max_size<\/span><span class=\"token operator\">&#061;<\/span>1g <span class=\"token assign-left variable\">inactive<\/span><span class=\"token operator\">&#061;<\/span>60m <span class=\"token assign-left variable\">use_temp_path<\/span><span class=\"token operator\">&#061;<\/span>off<span class=\"token punctuation\">;<\/span><\/p>\n<p>    server <span class=\"token punctuation\">{<\/span><br \/>\n        listen <span class=\"token number\">80<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        location \/ <span class=\"token punctuation\">{<\/span><br \/>\n            proxy_cache my_cache<span class=\"token punctuation\">;<\/span>                   <span class=\"token comment\"># \u542f\u7528\u7f13\u5b58<\/span><br \/>\n            proxy_cache_valid <span class=\"token number\">200<\/span> <span class=\"token number\">302<\/span> 10m<span class=\"token punctuation\">;<\/span>          <span class=\"token comment\"># \u72b6\u6001\u7801 200 \u548c 302 \u7684\u5185\u5bb9\u7f13\u5b58 10 \u5206\u949f<\/span><br \/>\n            proxy_cache_valid <span class=\"token number\">404<\/span> 1m<span class=\"token punctuation\">;<\/span>               <span class=\"token comment\"># \u72b6\u6001\u7801 404 \u7684\u5185\u5bb9\u7f13\u5b58 1 \u5206\u949f<\/span><br \/>\n            proxy_pass http:\/\/backend<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token comment\">#\u9632\u76d7\u94fe&#xff0c;\u5b9a\u4e49\u5141\u8bb8\u8bbf\u95ee\u7684 Referer&#xff0c;none&#xff1a;\u5141\u8bb8\u6ca1\u6709 Referer \u7684\u8bf7\u6c42&#xff1b;blocked&#xff1a;\u5141\u8bb8 Referer \u88ab\u4ee3\u7406\u9690\u85cf\u7684\u8bf7\u6c42\u3002<\/span><br \/>\n        location \/images\/ <span class=\"token punctuation\">{<\/span><br \/>\n            valid_referers none blocked *.example.com<span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token variable\">$invalid_referer<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n                <span class=\"token builtin class-name\">return<\/span> <span class=\"token number\">403<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\">#\u65e5\u5fd7\u5207\u5272<\/span><br \/>\n<span class=\"token function\">vi<\/span> \/etc\/logrotate.d\/nginx  <span class=\"token comment\">#\u4fdd\u5b58\u534a\u5e74<\/span><br \/>\n\/var\/log\/nginx\/*.log <span class=\"token punctuation\">{<\/span><br \/>\n    daily<br \/>\n    missingok<br \/>\n    rotate <span class=\"token number\">190<\/span><br \/>\n    compress<br \/>\n    delaycompress<br \/>\n    notifempty<br \/>\n    create 0640 www-data www-data<br \/>\n    sharedscripts<br \/>\n    postrotate<br \/>\n        \/usr\/local\/sbin\/nginx <span class=\"token parameter variable\">-s<\/span> reopen<br \/>\n    endscript<br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>3.3 \u56fe\u5f62\u7ba1\u7406\u5de5\u5177<\/h4>\n<p>1&#xff09;Tengine Dashboard\u529f\u80fd<\/p>\n<p>2&#xff09;Prometheus\u76d1\u63a7\u65b9\u6848&#043;Grafana\u53ef\u89c6\u5316\u9762\u677f<\/p>\n<p>3&#xff09;ELK\u65e5\u5fd7\u5206\u6790\u65b9\u6848<\/p>\n<h3>\u56db\u3001\u5e94\u7528\u6848\u4f8b<\/h3>\n<h4>4.1\u3001\u7535\u5546\u573a\u666f<\/h4>\n<p>1&#xff09;\u5927\u4fc3\u671f\u95f4\u52a8\u6001\u9650\u6d41\u914d\u7f6e<\/p>\n<p>upstream mall <span class=\"token punctuation\">{<\/span><br \/>\n    check <span class=\"token assign-left variable\">interval<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">3000<\/span> <span class=\"token assign-left variable\">rise<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span> <span class=\"token assign-left variable\">fall<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">3<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    server <span class=\"token number\">172.18<\/span>.1.101:8080<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\nlocation ~* <span class=\"token punctuation\">\\\\<\/span>.<span class=\"token punctuation\">(<\/span>jpg<span class=\"token operator\">|<\/span>css<span class=\"token punctuation\">)<\/span>$ <span class=\"token punctuation\">{<\/span><br \/>\n    expires 30d<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>2&#xff09;\u9759\u6001\u8d44\u6e90\u52a0\u901f\u65b9\u6848<\/p>\n<h4>4.2 \u91d1\u878d\u884c\u4e1a<\/h4>\n<p>1&#xff09;\u53cc\u5411\u8bc1\u4e66\u6821\u9a8c\u5b9e\u73b0<\/p>\n<p>2&#xff09;\u654f\u611f\u6570\u636e\u52a0\u5bc6\u4f20\u8f93<\/p>\n<p>3&#xff09;\u957f\u8fde\u63a5\u4fdd\u6301\u914d\u7f6e<\/p>\n<h4>4.3 MQTT\u534f\u8bae\u652f\u6301\u6848\u4f8b<\/h4>\n<h3>\u4e94\u3001FAQ<\/h3>\n<p>1&#xff09;\u517c\u5bb9\u6027\u95ee\u9898<\/p>\n<p>2&#xff09;\u4e0e\u539f\u751fNginx\u6a21\u5757\u51b2\u7a81\u5904\u7406<\/p>\n<p>3&#xff09;\u7248\u672c\u5347\u7ea7\u6ce8\u610f\u4e8b\u9879<\/p>\n<p>4&#xff09;\u6027\u80fd\u95ee\u9898<\/p>\n<p>5&#xff09;\u9ad8\u5e76\u53d1\u573a\u666f\u4f18\u5316\u5efa\u8bae<\/p>\n<p>6&#xff09;TIME_WAIT\u72b6\u6001\u5904\u7406<\/p>\n<p>7&#xff09;\u52a8\u6001\u52a0\u8f7d\u6a21\u5757\u5931\u8d25\u6392\u67e5<\/p>\n<p>8&#xff09;\u81ea\u5b9a\u4e49\u65e5\u5fd7\u683c\u5f0f\u914d\u7f6e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf11\u6b21\u3002Tengine\u662f\u4e00\u4e2a\u7531\u6dd8\u5b9d\u7f51\u53d1\u8d77\u7684 Web \u670d\u52a1\u5668\u9879\u76ee\u3002\u5b83\u57fa\u4e8e Nginx \u7136\u540e\u9488\u5bf9\u5927\u8bbf\u95ee\u91cf\u7f51\u7ad9\u7684\u9700\u6c42\uff0c\u6dfb\u52a0\u4e86\u5f88\u591a\u9ad8\u7ea7\u529f\u80fd\u548c\u7279\u6027\uff0c\u4ece 2011 \u5e74 12 \u6708\u5f00\u59cb\uff0cTengine \u6b63\u5f0f\u5f00\u6e90\u3002Tengine \u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u5df2\u7ecf100\u591a\u5bb6\u5927\u578b\u7f51\u7ad9\u5982\u6dd8\u5b9d\u7f51\uff0c\u5929\u732b\u5546\u57ce\u3001Youku\u3001AliExpress\u3001 Lazada \u3001Alibaba Cloud\u7b49\u5f97\u5230\u4e86\u751f\u4ea7\u578b\u68c0\u9a8c\u3002_tengine\u90e8\u7f72\u6848\u4f8b<\/p>\n","protected":false},"author":2,"featured_media":44585,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[4187,4188,4190,4189,43,44],"topic":[],"class_list":["post-44596","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-tengine","tag-waf","tag-web","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u4e4bTengine - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/44596.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u4e4bTengine - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf11\u6b21\u3002Tengine\u662f\u4e00\u4e2a\u7531\u6dd8\u5b9d\u7f51\u53d1\u8d77\u7684 Web \u670d\u52a1\u5668\u9879\u76ee\u3002\u5b83\u57fa\u4e8e Nginx \u7136\u540e\u9488\u5bf9\u5927\u8bbf\u95ee\u91cf\u7f51\u7ad9\u7684\u9700\u6c42\uff0c\u6dfb\u52a0\u4e86\u5f88\u591a\u9ad8\u7ea7\u529f\u80fd\u548c\u7279\u6027\uff0c\u4ece 2011 \u5e74 12 \u6708\u5f00\u59cb\uff0cTengine \u6b63\u5f0f\u5f00\u6e90\u3002Tengine \u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u5df2\u7ecf100\u591a\u5bb6\u5927\u578b\u7f51\u7ad9\u5982\u6dd8\u5b9d\u7f51\uff0c\u5929\u732b\u5546\u57ce\u3001Youku\u3001AliExpress\u3001 Lazada \u3001Alibaba Cloud\u7b49\u5f97\u5230\u4e86\u751f\u4ea7\u578b\u68c0\u9a8c\u3002_tengine\u90e8\u7f72\u6848\u4f8b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/44596.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-19T08:15:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081546-6853c732eee23.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/44596.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/44596.html\",\"name\":\"\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u4e4bTengine - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-06-19T08:15:50+00:00\",\"dateModified\":\"2025-06-19T08:15:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/44596.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/44596.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/44596.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u4e4bTengine\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u4e4bTengine - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/44596.html","og_locale":"zh_CN","og_type":"article","og_title":"\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u4e4bTengine - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf11\u6b21\u3002Tengine\u662f\u4e00\u4e2a\u7531\u6dd8\u5b9d\u7f51\u53d1\u8d77\u7684 Web \u670d\u52a1\u5668\u9879\u76ee\u3002\u5b83\u57fa\u4e8e Nginx \u7136\u540e\u9488\u5bf9\u5927\u8bbf\u95ee\u91cf\u7f51\u7ad9\u7684\u9700\u6c42\uff0c\u6dfb\u52a0\u4e86\u5f88\u591a\u9ad8\u7ea7\u529f\u80fd\u548c\u7279\u6027\uff0c\u4ece 2011 \u5e74 12 \u6708\u5f00\u59cb\uff0cTengine \u6b63\u5f0f\u5f00\u6e90\u3002Tengine \u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u5df2\u7ecf100\u591a\u5bb6\u5927\u578b\u7f51\u7ad9\u5982\u6dd8\u5b9d\u7f51\uff0c\u5929\u732b\u5546\u57ce\u3001Youku\u3001AliExpress\u3001 Lazada \u3001Alibaba Cloud\u7b49\u5f97\u5230\u4e86\u751f\u4ea7\u578b\u68c0\u9a8c\u3002_tengine\u90e8\u7f72\u6848\u4f8b","og_url":"https:\/\/www.wsisp.com\/helps\/44596.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-06-19T08:15:50+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250619081546-6853c732eee23.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/44596.html","url":"https:\/\/www.wsisp.com\/helps\/44596.html","name":"\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u4e4bTengine - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-06-19T08:15:50+00:00","dateModified":"2025-06-19T08:15:50+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/44596.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/44596.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/44596.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u4e4bTengine"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/44596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=44596"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/44596\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/44585"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=44596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=44596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=44596"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=44596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}