{"id":2461,"date":"2020-10-25T12:28:36","date_gmt":"2020-10-25T04:28:36","guid":{"rendered":"https:\/\/www.charflower.com\/?p=2461"},"modified":"2020-10-25T15:59:45","modified_gmt":"2020-10-25T07:59:45","slug":"nginx-%e5%85%a5%e9%97%a8%e4%b8%8e%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.charflower.com\/?p=2461","title":{"rendered":"Nginx-\u5165\u95e8\u4e0e\u5b89\u88c5"},"content":{"rendered":"\n<p><strong>\u5e38\u89c1\u7684\u4e24\u79cd\u67b6\u6784\uff1a\u8d1f\u8f7d\u5747\u8861\u548c\u9ad8\u53ef\u7528<\/strong><\/p>\n\n\n\n<p><strong>\u96c6\u7fa4\uff1a\u901a\u8fc7\u591a\u53f0\u8bbe\u5907\u534f\u8c03\u8fd0\u4f5c\u2014\u6ee1\u8db3\u6211\u4eec\u4e00\u4e2a\u529f\u80fd<\/strong><\/p>\n\n\n\n<p><strong>\u8d1f\u8f7d\u5747\u8861\uff1a\u8ba9\u539f\u672c\u4e00\u6761\u7ebf \u53d8\u6210\u591a\u6761\uff0c\u51cf\u8f7b\u4e00\u53f0\u7684\u538b\u529b&nbsp; \uff08Nginx&nbsp; + Lvs\uff09&nbsp; &nbsp; &nbsp;Nginx\u53ef\u4ee5\u4f5c\u4e3aWeb\u3001\u8d1f\u8f7d\uff08\u53cd\u5411\u4ee3\u7406\uff09\uff1b<\/strong><\/p>\n\n\n\n<p><strong>\u9ad8\u53ef\u7528\uff1a\u591a\u53f0\u76f8\u540c\u7684\u670d\u52a1\u5668\u4e4b\u95f4\u76f8\u4e92\u5197\u4f59&nbsp; \uff08Keepalived\uff09<\/strong><\/p>\n\n\n\n<p><strong>&nbsp; &nbsp;Nginx\uff08engine x\uff09\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684HTTP\u548c\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u3002\u56e0\u5b83\u7684\u7a33\u5b9a\u6027\u3001\u4e30\u5bcc\u7684\u529f\u80fd\u96c6\u3001\u793a\u4f8b\u914d\u7f6e\u6587\u4ef6\u548c\u4f4e\u7cfb\u7edf\u8d44\u6e90\u7684\u6d88\u8017\u800c\u95fb\u540d\u3002<\/strong><\/p>\n\n\n\n<p><strong> &nbsp;Nginx\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u7684Web\u670d\u52a1\u5668\/\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u53ca\u7535\u5b50\u90ae\u4ef6\uff08IMAP\/POP3\uff09\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u5e76\u5728\u4e00\u4e2aBSD-like\u534f\u8bae\u4e0b\u53d1\u884c\u3002\u5176\u7279\u70b9\u662f\u5360\u7528\u5185\u5b58\u5c11\uff0c\u5e76\u53d1\u80fd\u529b\u5f3a\u3002\u4e8b\u5b9e\u4e0aNginx\u7684\u5e76\u53d1\u80fd\u529b\u786e\u5b9e\u5728\u540c\u7c7b\u578b\u7684\u7f51\u9875\u670d\u52a1\u5668\u4e2d\u8868\u73b0\u8f83\u597d\uff0c\u4e2d\u56fd\u5927\u9646\u4f7f\u7528nginx\u7f51\u7ad9\u7528\u6237\u6709\uff1a\u767e\u5ea6BWS\u3001\u65b0\u6d6a\u3001\u7f51\u6613\u3001\u817e\u8baf\u7b49\uff1b<\/strong><\/p>\n\n\n\n<p><strong> Nginx\u7684web\u670d\u52a1\u5668\u5177\u6709\u9ad8\u6027\u80fd\uff0c\u5bf9\u6bd4Apache\u5e76\u53d1\u91cf\u9ad85-10\u500d\uff1b\u8f7b\u91cf\u7ea7\u4f53\u73b0\u5728\u4ee3\u7801\u7b80\u6d01\uff1b<\/strong><\/p>\n\n\n\n<p><strong>  Nginx\u7684\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u6b63\u5411\u4ee3\u7406-\u53ea\u80fd\u7528\u4e8e\u5ba2\u6237\u7aef\uff0c\u6bd4\u5982NAT\u5171\u4eab\u4e0a\u7f51\u3001\u4e2a\u4eba\u4f7f\u7528VPN\uff0c\u4ee3\u7406\u8bbe\u5907\u4ee3\u66ff\u5ba2\u6237\u7aef\u53d1\u9001\u8bf7\u6c42\uff1b\u53cd\u5411\u4ee3\u7406-\u7528\u4e8e\u670d\u52a1\u5668-\u96c6\u7fa4\u67b6\u6784\u5c42\u9762\u6216\u8005\u7f13\u5b58\uff0cNginx\u3001squid\u7b49\uff0c\u4ee3\u7406\u8bbe\u5907\u4ee3\u66ff\u670d\u52a1\u5668\u8fdb\u884c\u8bf7\u6c42\u7684\u63a5\u53d7\uff0c\u7136\u540e\u628a\u8bf7\u6c42\u53d1\u9001\u7ed9\u771f\u5b9e\u670d\u52a1\u5668\uff08Real Server\uff09\uff0c\u8fdb\u800c\u4fdd\u62a4RS\u7684\u4fe1\u606f\u5b89\u5168\uff1b<\/strong><\/p>\n\n\n\n<p><strong> Nginx\u5b98\u65b9\u7f51\u7ad9 <\/strong>\uff1a<\/p>\n\n\n\n<p><strong>RamBler : http:\/\/www.rambler.ru\/           Nginx : <\/strong><a href=\"http:\/\/nginx.org\/\"><strong>http:\/\/nginx.org\/<\/strong><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"695\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipboard-1-1024x695.png\" alt=\"\" class=\"wp-image-2463\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipboard-1-1024x695.png 1024w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipboard-1-300x204.png 300w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipboard-1-768x521.png 768w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipboard-1.png 1491w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption> <strong>Mainline  version     \u4e3b\u7ebf\u7248\u672c    \u5947\u6570\u7248\u672c-\u53eb\u505a\u5f00\u53d1\u6d4b\u8bd5\u7248\u672c<\/strong><br><strong>Stable version          \u7a33\u5b9a\u7248\u672c    \u5076\u6570\u7248\u672c-\u7a33\u5b9a\u7684\uff0c\u7528\u4e8e\u751f\u4ea7\u73af\u5883<\/strong><br><strong>Legacy version         \u5386\u53f2\u7248\u672c    \u5076\u6570\u7248\u672c-\u4e5f\u662f\u7a33\u5b9a\u7684<\/strong> <\/figcaption><\/figure>\n\n\n\n<p><strong>\u5982\u679c\u516c\u53f8\u662f\u6700\u65b0\u7684\u67b6\u6784\uff0c\u90a3\u4e48\u5c31\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u5c31\u884c\uff0c\u5927\u4f01\u4e1a\u4e00\u822c\u90fd\u662f\u4e8c\u5f00\u7684\uff0cNginx\u4e2d\u5c0f\u4f01\u4e1a\u90fd\u662f\u6e90\u7801\u5b89\u88c5\uff0c\u5927\u4f01\u4e1a\u81ea\u5efayum\u4ed3\u5e93\u5b89\u88c5\uff0cNginx\u652f\u6301yum\u5b89\u88c5\uff0c\u4f46\u662f\u9700\u8981EPEL\u6e90\uff1b<\/strong><\/p>\n\n\n\n<p><strong>\u7248\u672c\u7684\u9009\u62e9\uff1aNginx\u591a\u4e2a\u7a33\u5b9a\uff0c\u5e94\u8be5\u600e\u4e48\u53bb\u9009\u62e9\uff0c1\u3001\u770b\u5177\u4f53\u7684\u4e1a\u52a1\uff0c\u67d0\u4e2a\u7248\u672c\u662f\u5426\u652f\u6301   2\u3001\u4f1a\u9009\u62e9\u8ddd\u79bb\u73b0\u5728\u534a\u5e74\u5de6\u53f3\u7684\u7a33\u5b9a\u7248\u672c  <\/strong><\/p>\n\n\n\n<h4>\u4e86\u89e3Tengine\uff1a<\/h4>\n\n\n\n<p><strong>Tengine\u662f\u7531\u6dd8\u5b9d\u7f51\u53d1\u8d77\u7684Web\u670d\u52a1\u5668\u9879\u76ee\uff0c\u5b83\u5728Nginx\u7684\u57fa\u7840\u4e0a\uff0c\u9488\u5bf9\u5927\u8bbf\u95ee\u91cf\u7f51\u7ad9\u7684\u9700\u6c42\uff0c\u6dfb\u52a0\u4e86\u5f88\u591a\u9ad8\u7ea7\u529f\u80fd\u548c\u7279\u6027\uff0cTengine\u7684\u6027\u80fd\u5df2\u7ecf\u5728\u5927\u578b\u7f51\u7ad9\u5f97\u5230\u4e86\u5f88\u597d\u7684\u68c0\u9a8c\uff0c\u6dd8\u5b9d\u62ff\u5230\u4e86Nginx\u6e90\u4ee3\u7801\u4e4b\u540e\uff0c\u8fdb\u884c\u4e86\u529f\u80fd\u7684\u586b\u5145\uff0c\u4f18\u5316\u7b49\u7b49\uff0c\u7136\u540e\u63d0\u4ea4\u7ed9Nginx\u5b98\u65b9\uff0c\u7531\u4e8eNginx\u5b98\u65b9\u54cd\u5e94\u6162\uff0c\u52a0\u4e0a\u8bed\u8a00\u6c9f\u901a\u4e0d\u987a\u7545\uff0c\u6dd8\u5b9d\u516c\u53f8\u81ea\u5df1\u6253\u5305\uff0c\u4e8e\u662f\u5c31\u6709\u73b0\u5728\u7684Tengine\u8fd9\u4e2a\u7248\u672c\uff1b\u9002\u7528\u4e8e\u7535\u5546\u7f51\u7ad9\uff1b<\/strong><\/p>\n\n\n\n<p><strong>\u5b98\u7f51\u7f51\u7ad9\uff1a<\/strong><a href=\"http:\/\/tengine.taobao.org\/\"><strong>http:\/\/tengine.taobao.org\/<\/strong><\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4>\u4e00\u3001LNMP\u539f\u7406<\/h4>\n\n\n\n<p><strong>Nginx\u672c\u8eab\u53ea\u652f\u6301\u9759\u6001\u9875\u9762\u7684\u5904\u7406\uff0c\u5f53\u5ba2\u6237\u7aef\u8bbf\u95eephp\u9875\u9762\u7684\u65f6\u5019\uff0cNginx\u4f1a\u5c06php\u8f6c\u5230php-fpm\u5904\u7406\uff0cphp-fpm\u670d\u52a1\u4f1a\u628aphp\u9875\u9762\u89e3\u6790\u6210html\u6587\u4ef6\u7ed9Nginx\u5904\u7406\uff0cNginx\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u5904\u7406\uff1b<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u8fd9\u91cc\u9700\u8981\u7ed3\u5408Apache\u7684\u5de5\u4f5c\uff0c\u5bf9PHP\u6587\u4ef6\u5904\u7406\u8fc7\u7a0b\u7684\u533a\u522b      <\/strong><\/p>\n\n\n\n<p><strong>1\u3001Nginx\u662f\u901a\u8fc7php-fpm\u8fd9\u4e2a\u670d\u52a1\u6765\u5904\u7406php\u6587\u4ef6      <\/strong><\/p>\n\n\n\n<p><strong>2\u3001Apache\u662f\u901a\u8fc7libphp5.so\u6a21\u5757\u6765\u5904\u7406php\u6587\u4ef6<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"578\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo1ard-1024x578.png\" alt=\"\" class=\"wp-image-2466\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo1ard-1024x578.png 1024w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo1ard-300x169.png 300w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo1ard-768x434.png 768w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo1ard.png 1047w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption> <strong> Apache\u7684libphp5.so\u968f\u7740apache\u670d\u52a1\u5668\u4e00\u8d77\u8fd0\u884c\uff0c\u800cNginx\u548cphp-fpm\u662f\u5404\u81ea\u72ec\u7acb\u8fd0\u884c\uff0c\u6240\u4ee5\u5728\u670d\u52a1\u7684\u8fd0\u884c\u8fc7\u7a0b\u4e2d\uff0cNginx\u548cphp-fpm\u90fd\u9700\u8981\u5206\u522b\u542f\u52a8\uff0cNginx\u4e0ephp-fpm\u901a\u8baf\u7aef\u53e39000\uff1b<\/strong> <br>    <strong>    Nginx\u7279\u70b9\u662f\u5360\u7528\u5185\u5b58\u5c11\uff0c\u5e76\u53d1\u80fd\u529b\u5f3a\uff0c\u4e8b\u5b9e\u4e0aNginx\u7684\u5e76\u53d1\u80fd\u529b\u786e\u5b9e\u5728\u540c\u7c7b\u578b\u7684\u7f51\u9875\u670d\u52a1\u5668\u4e2d\u8868\u8c61\u8f83\u597d\u3002<\/strong> <\/figcaption><\/figure>\n\n\n\n<p><strong>Nginx\u76f8\u5bf9\u4e8eApache\u4f18\u70b9\u5982\u4e0b\uff1a<\/strong><\/p>\n\n\n\n<ul><li> <strong>\u9ad8\u5e76\u53d1\u54cd\u5e94\u6027\u80fd\u975e\u5e38\u597d\uff0c\u5b98\u65b9Nginx\u5904\u7406\u9759\u6001\u6587\u4ef6\u5e76\u53d15W\/s\uff0c\u6807\u51c6\u914d\u7f6e\uff1aCPU\uff1a8C\uff0cMEM\uff1a16G\uff0cDisk 600G\uff0c\u6027\u80fd\u76f8\u5f53\u4e8eApache\u76845-10\u500d\uff1b<\/strong> <\/li><li><strong>\u8d1f\u8f7d\u5747\u8861\u53ca\u53cd\u5411\u4ee3\u7406\u6027\u80fd\u975e\u5e38\u5f3a<\/strong><\/li><li><strong>\u7cfb\u7edf\u5185\u5b58\u548cCPU\u5360\u7528\u7387\u4f4e<\/strong><\/li><li><strong>\u53ef\u5bf9\u540e\u7aef\u670d\u52a1\u8fdb\u884c\u5065\u5eb7\u68c0\u67e5<\/strong><\/li><li><strong>\u652f\u6301PHP cgi\u65b9\u5f0f\u548cFastCGI\u65b9\u5f0f<\/strong><\/li><li><strong>\u53ef\u4ee5\u4f5c\u4e3a\u7f13\u5b58\u670d\u52a1\u5668\u3001\u90ae\u4ef6\u4ee3\u7406\u670d\u52a1\u5668\uff1b<\/strong><\/li><li><strong>\u914d\u7f6e\u4ee3\u7801\u7b80\u6d01\u4e14\u5bb9\u6613\u4e0a\u624b<\/strong><\/li><\/ul>\n\n\n\n<p> <\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4>\u4e8c\u3001Nginx\u5de5\u4f5c\u539f\u7406<\/h4>\n\n\n\n<p><strong>Nginx\u7684\u6a21\u5757\u4ece\u7ed3\u6784\u4e0a\u5206\u4e3a\u5982\u4e0b\u4e09\u7c7b\uff1a<\/strong><\/p>\n\n\n\n<ul><li><strong>\u6838\u5fc3\u6a21\u5757\uff1aHTTP\u6a21\u5757\u3001Event\u6a21\u5757\u3001Mail\u6a21\u5757\u7b49\uff1b<\/strong><\/li><li><strong>\u57fa\u7840\u6a21\u5757\uff1aHTTP Access\u6a21\u5757\u3001HTTP FastCGI\u6a21\u5757\u3001HTTP Proxy\u6a21\u5757\u548cHTTP Rewrite\u6a21\u5feb\uff1b<\/strong><\/li><li><strong>\u7b2c\u4e09\u65b9\u6a21\u5757\uff1aHTTP Upstream Request Hash\u6a21\u5757\u3001Notice\u6a21\u5757\u548cHTTP Access Key\u6a21\u5757\u3001Limit_req\u6a21\u5757\u7b49\uff1b<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Nginx\u7684\u6a21\u5757\u4ece\u529f\u80fd\u4e0a\u5206\u4e3a\u5982\u4e0b\u4e09\u7c7b\uff1a<\/strong><\/p>\n\n\n\n<ul><li><strong>Handlers \uff08\u5904\u7406\u5668\u6a21\u5757\uff09\uff1a\u6b64\u7c7b\u6a21\u5757\u76f4\u63a5\u5904\u7406\u8bf7\u6c42\uff0c\u5e76\u8fdb\u884c\u8f93\u51fa\u5185\u5bb9\u548c\u4fee\u6539headers\u4fe1\u606f\u7b49\u64cd\u4f5c\uff0cHandlers\u5904\u7406\u5668\u6a21\u5757\u4e00\u822c\u53ea\u80fd\u6709\u4e00\u4e2a\uff1b<\/strong><\/li><li><strong>Filters \uff08\u8fc7\u6ee4\u5668\u6a21\u5757\uff09\uff1a\u6b64\u7c7b\u6a21\u5757\u4e3b\u8981\u5bf9\u5176\u4ed6\u5904\u7406\u6a21\u5757\u8f93\u51fa\u7684\u5185\u5bb9\u8fdb\u884c\u4fee\u6539\u64cd\u4f5c\uff0c\u6700\u540e\u7531Nginx\u8f93\u51fa\uff1b<\/strong><\/li><li><strong>Proxies \uff08\u4ee3\u7406\u7c7b\u6a21\u5757\uff09\uff1a\u6b64\u7c7b\u6a21\u5757\u662fNginx\u7684HTTP Upstream\u4e4b\u7c7b\u7684\u6a21\u5757\uff0c\u8fd9\u4e9b\u6a21\u5757\u4e3b\u8981\u4e0e\u540e\u7aef\u4e00\u4e9b\u670d\u52a1\u6bd4\u5982FastCGI\u7b49\u8fdb\u884c\u4ea4\u4e92\uff0c\u5b9e\u73b0\u670d\u52a1\u4ee3\u7406\u548c\u8d1f\u8f7d\u5747\u8861\u7b49\u529f\u80fd\u3002<\/strong><\/li><\/ul>\n\n\n\n<p><strong>        Nginx\u7531\u5185\u6838\u548c\u6a21\u5757\u7ec4\u6210\uff0c\u5176\u4e2d\u5185\u6838\u7684\u8bbe\u8ba1\u975e\u5e38\u5fae\u5c0f\u548c\u7b80\u6d01\uff0c\u5b8c\u6210\u7684\u5de5\u4f5c\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u4ec5\u4ec5\u901a\u8fc7\u67e5\u627e\u914d\u7f6e\u6587\u4ef6\uff08nginx.conf\uff09\u5c06\u5ba2\u6237\u7aef\uff08\u7528\u6237\uff09\u7684\u8bf7\u6c42\u6620\u5c04\u5230\u4e00\u4e2aLocation block\uff0c\u800clocation\u662fNginx\u914d\u7f6e\u4e2d\u7684\u4e00\u4e2a\u6307\u4ee4\uff0c\u7528\u4e8e\u5339\u914d\u7528\u6237\u8bbf\u95ee\u7684URL\u8def\u5f84\uff0c\u800c\u5728\u8fd9\u4e2aLocation\u4e2d\u6240\u914d\u7f6e\u7684\u6bcf\u4e2a\u6307\u4ee4\u5c06\u4f1a\u542f\u52a8\u4e0d\u540c\u7684\u6a21\u5757\u53bb\u5b8c\u6210\u76f8\u5e94\u7684\u5de5\u4f5c\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"566\" height=\"303\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipboa2rd.png\" alt=\"\" class=\"wp-image-2467\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipboa2rd.png 566w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipboa2rd-300x161.png 300w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><\/figure>\n\n\n\n<p><strong>        Nginx\u7684\u9ad8\u5e76\u53d1\u5f97\u76ca\u4e8e\u5176\u91c7\u7528\u4e86epoll\u6a21\u578b\uff0c\u4e0e\u4f20\u7edf\u670d\u52a1\u5668\u7a0b\u5e8f\u67b6\u6784\u4e0d\u540c\uff0cepoll\u662fLinux\u5185\u68382.6\u4ee5\u540e\u624d\u51fa\u73b0\u7684\uff0cNginx\u91c7\u7528epoll\u6a21\u578b\uff0c\u5f02\u6b65\u975e\u963b\u585e\uff0c\u800capache\u91c7\u7528\u7684\u662fselect\u6a21\u578b\uff1b<\/strong><\/p>\n\n\n\n<p><strong>        Select\u7279\u70b9\uff1aSlelect\u9009\u62e9\u53e5\u67c4\u7684\u65f6\u5019\uff0c\u662f\u904d\u5386\u6240\u6709\u53e5\u67c4\uff0c\u4e5f\u5c31\u662f\u8bf4\u53e5\u67c4\u6709\u65f6\u95f4\u54cd\u5e94\u7684\u65f6\u5019\uff0cSelect\u9700\u8981\u904d\u5386\u6240\u6709\u53e5\u67c4\u624d\u80fd\u83b7\u53d6\u5230\u90a3\u4e9b\u53e5\u67c4\u6709\u65f6\u95f4\u901a\u77e5\uff0c\u56e0\u6b64\u6548\u7387\u662f\u975e\u5e38\u4f4e\uff1b<\/strong><\/p>\n\n\n\n<p><strong>         epoll\u7684\u7279\u70b9\uff1aepoll\u5bf9\u4e8e\u53e5\u67c4\u4e8b\u4ef6\u7684\u9009\u62e9\u4e0d\u662f\u904d\u5386\u7684\uff0c\u662f\u4e8b\u4ef6\u54cd\u5e94\u7684\uff0c\u5c31\u662f\u53e5\u67c4\u4e0a\u4e8b\u4ef6\u6765\u5c31\u9a6c\u4e0a\u9009\u62e9\u51fa\u6765\uff0c\u4e0d\u9700\u8981\u904d\u5386\u6574\u4e2a\u53e5\u67c4\u94fe\u8868\uff0c\u56e0\u6b64\u6548\u7387\u975e\u5e38\u9ad8\uff1b<\/strong><\/p>\n\n\n\n<p> <\/p>\n\n\n\n<h4>\u4e09\u3001<strong>Nginx\u5b89\u88c5\u914d\u7f6e<\/strong><\/h4>\n\n\n\n<p><strong>         Nginx Web\u5b89\u88c5\u65f6\u53ef\u4ee5\u6307\u5b9a\u5f88\u591a\u7684\u6a21\u5757\uff0c\u9ed8\u8ba4\u9700\u8981\u5b89\u88c5Rewrite\u6a21\u5757\uff0c\u4e5f\u5373\u662f\u9700\u8981\u7cfb\u7edf\u53c8PCRE\u5e93\uff0c\u5b89\u88c5Pcre\u652f\u6301Rewrite\u529f\u80fd\uff08\u7075\u6d3b\u7684\u64cd\u4f5c\u5c31\u4e00\u5b9a\u9700\u8981\u6b63\u5219\uff0c\u7528\u6b63\u5219\u5c31\u9700\u8981Pcre\u5e93\uff09\uff0c\u5982\u4e0b\u4e3a\u5b89\u88c5Nginx Web\u670d\u52a1\u5668\u65b9\u6cd5\uff1a<\/strong><\/p>\n\n\n\n<p><strong>\u5b89\u88c5PCRE\uff0c\u4e0d\u786e\u5b9a\u88c5\u90a3\u4e2a\uff0c\u76f4\u63a5\u5c06\u5f00\u53d1\u7ec4\u5305\u90fd\u88c5\u4e0a:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB ~]# yum install -y pcre-devel<\/code><\/pre>\n\n\n\n<p><strong>\u5b89\u88c5\u57fa\u7840\u8f6f\u4ef6\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB ~]# yum install -y vim gcc gcc-c++ wget lrzsz<\/code><\/pre>\n\n\n\n<p><strong>\u4e0a\u4f20nginx-1.12.2.tar.gz\uff0c\u5e76\u89e3\u538b\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"668\" height=\"169\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb4oard.png\" alt=\"\" class=\"wp-image-2468\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb4oard.png 668w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb4oard-300x76.png 300w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb4oard-665x169.png 665w\" sizes=\"(max-width: 668px) 100vw, 668px\" \/><\/figure>\n\n\n\n<p><strong>\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5Nginx\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB ~]# cd nginx-1.12.2\n[root@LB nginx-1.12.2]# useradd www -s \/sbin\/nologin -M      #\u521b\u5efanginx\u7684\u7cfb\u7edf\u7528\u6237www\n[root@LB nginx-1.12.2]# .\/configure --prefix=\/usr\/local\/nginx --with-http_dav_module --with-http_stub_status_module --with-http_addition_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-pcre=\/usr\/local\/src\/pcre-8.37\n<\/code><\/pre>\n\n\n\n<p><strong>\u9884\u7f16\u8bd1\u53c2\u6570\u8bf4\u660e\uff1a<\/strong><\/p>\n\n\n\n<p><strong> &#8211;prefix=\/usr\/local\/nginx    #\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5\u8def\u5f84<\/strong><\/p>\n\n\n\n<p><strong>&#8211;with-http_dav_module      #\u542f\u7528\u652f\u6301\uff08\u589e\u52a0PUT\u3001DELETE\u3001MKCOL\uff1a\u521b\u5efa\u96c6\u5408\uff0cCOPY\u548cMOVE\u65b9\u6cd5\uff09  \u9ed8\u8ba4\u662f\u5173\u95ed\u7684\uff0c\u9700\u8981\u7f16\u8bd1\u5f00\u542f\uff1b<\/strong><\/p>\n\n\n\n<p><strong> &#8211;with-http_stub_status_module   #\u542f\u7528\u652f\u6301\uff08\u83b7\u53d6Nginx\u4e0a\u6b21\u542f\u52a8\u4ee5\u6765\u7684\u5de5\u4f5c\u72b6\u6001\uff09\uff1b<\/strong><\/p>\n\n\n\n<p><strong>&#8211;with-http_addition_module     #\u542f\u7528\u652f\u6301\uff08\u4f5c\u4e3a\u4e00\u4e2a\u8f93\u51fa\u8fc7\u6ee4\u5668\uff0c\u652f\u6301\u4e0d\u5b8c\u5168\u7f13\u51b2\uff0c\u5206\u90e8\u5206\u54cd\u5e94\u8bf7\u6c42\uff09\uff1b<\/strong><\/p>\n\n\n\n<p><strong>&#8211;with-http_sub_module    #\u542f\u7528\u652f\u6301 \uff08\u5141\u8bb8\u4e00\u4e9b\u5176\u4ed6\u6587\u672c\u66ff\u6362Nginx\u76f8\u5e94\u4e2d\u7684\u4e00\u4e9b\u6587\u672c\uff09\uff1b<\/strong><\/p>\n\n\n\n<p><strong> &#8211;with-http_flv_module     #\u542f\u7528\u652f\u6301 \uff08\u63d0\u4f9b\u652f\u6301flv\u89c6\u9891\u6587\u4ef6\u652f\u6301\uff09\uff1b<\/strong><\/p>\n\n\n\n<p><strong>&#8211;with-http_mp4_module    #\u542f\u7528\u652f\u6301  \uff08\u63d0\u4f9b\u652f\u6301MP4\u89c6\u9891\u6587\u4ef6\u652f\u6301\uff0c\u63d0\u4f9b\u4f2a\u6d41\u5a92\u4f53\u670d\u52a1\u7aef\u652f\u6301\uff09\uff1b<\/strong><\/p>\n\n\n\n<p><strong>&#8211;with-pcre=\/usr\/local\/src\/pcre-8.37  #\u9700\u8981\u6ce8\u610f\uff0c\u8fd9\u91cc\u6307\u7684\u662f\u6e90\u7801\u5b89\u88c5\u7684pcre\uff0c\u9700\u8981\u6307\u660e\u8def\u5f84\uff0cyum\u5b89\u88c5\u7684\u5219\u4e0d\u9700\u8981\uff0c\u4e0a\u8ff0\u6211\u4eec\u7528\u7684\u662fyum\u5b89\u88c5\u7684\uff0c\u6240\u4ee5\u8fd9\u4e2a\u53c2\u6570\u73b0\u5728\u4e0d\u9700\u8981\uff1b<\/strong><\/p>\n\n\n\n<p><strong>\u9884\u7f16\u8bd1\u7684\u65f6\u5019\uff0c\u51fa\u73b0error\uff1a<\/strong><\/p>\n\n\n\n<p><strong>\u89e3\u51b3\u65b9\u5f0f\uff1ayum install -y zlib-devel   #\u7f3a\u5c11XXX library\uff0c\u5c31\u5b89\u88c5XXX-devel<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"797\" height=\"171\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo45ard.png\" alt=\"\" class=\"wp-image-2470\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo45ard.png 797w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo45ard-300x64.png 300w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo45ard-768x165.png 768w\" sizes=\"(max-width: 797px) 100vw, 797px\" \/><\/figure>\n\n\n\n<p><strong>\u5b89\u88c5zlib\u4e4b\u540e\u91cd\u65b0\u9884\u7f16\u8bd1\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB nginx-1.12.2]# make &amp;&amp; make install<\/code><\/pre>\n\n\n\n<p><strong>\u8fdb\u5165\u5230\u5b89\u88c5\u8def\u5f84\uff0c\u5c314\u4e2a\u76ee\u5f55\uff0c\u5982\u4e0b\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"694\" height=\"163\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb555oard.png\" alt=\"\" class=\"wp-image-2471\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb555oard.png 694w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb555oard-300x70.png 300w\" sizes=\"(max-width: 694px) 100vw, 694px\" \/><figcaption> <strong>\u76ee\u5f55\u8bf4\u660e\uff1a<\/strong><br><strong>conf     #Nginx\u7684\u914d\u7f6e\u6587\u4ef6\u5185\u5bb9<\/strong><br><strong>html     #\u7f51\u7ad9\u7684\u7f51\u9875\u7ad9\u70b9<\/strong><br><strong>logs     #\u5b58\u653eNginx\u7684\u65e5\u5fd7<\/strong><br><strong>sbin     #Nginx\u7684\u63a7\u5236\u547d\u4ee4<\/strong> <\/figcaption><\/figure>\n\n\n\n<p><strong>sbin\u76ee\u5f55\u4e0b\u63a7\u5236\u547d\u4ee4\u5c31\u4e00\u4e2a\uff1a\/usr\/local\/nginx\/sbin\/nginx <\/strong><\/p>\n\n\n\n<p><strong>\u4f46\u662f\u540e\u9762\u652f\u6301\u5982\u4e0b\u5185\u5bb9\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"812\" height=\"332\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb456oard.png\" alt=\"\" class=\"wp-image-2472\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb456oard.png 812w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb456oard-300x123.png 300w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb456oard-768x314.png 768w\" sizes=\"(max-width: 812px) 100vw, 812px\" \/><figcaption> <strong>\u6ce8\u91ca\uff1a<\/strong><br><strong>\/usr\/local\/nginx\/sbin\/nginx      #\u542f\u52a8Nginx\u7684Web\u670d\u52a1<\/strong><br><strong>\/usr\/local\/nginx\/sbin\/nginx -s stop     #\u505c\u6b62Nginx\u7684Web\u670d\u52a1<\/strong><br><strong>\/usr\/local\/nginx\/sbin\/nginx -s reload     #\u5e73\u6ed1\u91cd\u542fNginx\u7684Web\u670d\u52a1<\/strong> <\/figcaption><\/figure>\n\n\n\n<p><strong>\u542f\u52a8Nginx\uff0c\u5e76\u8bbf\u95eeNginx\u7684\u9ed8\u8ba4\u9875\u9762\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"388\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board-1024x388.png\" alt=\"\" class=\"wp-image-2473\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board-1024x388.png 1024w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board-300x114.png 300w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board-768x291.png 768w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board.png 1147w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption> <strong>\u8fd9\u4e2a\u9875\u9762\u5728Nginx\u7684html\u76ee\u5f55\u4e0b\u7684index.html<\/strong> <\/figcaption><\/figure>\n\n\n\n<p><strong>\u5c06index.html\u79fb\u9664\uff0c\u91cd\u542fNginx\uff0c\u91cd\u65b0\u8bbf\u95ee\u9875\u9762\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"662\" height=\"170\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo9ard-1.png\" alt=\"\" class=\"wp-image-2474\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo9ard-1.png 662w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo9ard-1-300x77.png 300w\" sizes=\"(max-width: 662px) 100vw, 662px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"354\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb0oard-1024x354.png\" alt=\"\" class=\"wp-image-2475\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb0oard-1024x354.png 1024w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb0oard-300x104.png 300w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb0oard-768x266.png 768w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb0oard.png 1046w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>\u4e3a\u4ec0\u4e48\u8bbf\u95ee\u4f1a\u51fa\u73b0403 Forbidden \uff1f  \u5982\u4e0b\uff1a<\/strong><\/p>\n\n\n\n<p><strong>\u9996\u5148\uff0c\u5148\u8fc7\u6ee4Nginx\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u6ce8\u91ca\u884c\u548c\u7a7a\u884c\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB ~]# cd \/usr\/local\/nginx\/conf\/\n[root@LB conf]# mv nginx.conf nginx.conf.bak\n[root@LB conf]# egrep -v \"#|^$\" nginx.conf.bak &gt; nginx.conf     <\/code><\/pre>\n\n\n\n<p><strong>\u914d\u7f6e\u6587\u4ef6\u4e2d\u5185\u5bb9\uff0c\u5982\u4e0b\uff1a <\/strong><\/p>\n\n\n\n<p><strong>\u5f53Nginx\u8bbf\u95ee\u9519\u8bef\uff0c\u6216\u8005\u6709\u9519\u8bef\u9875\u9762\uff0c\u5c31\u4f1a\u8fd4\u56de\u7ed9\u7528\u6237html\u76ee\u5f55\u4e2d\u768450x.html;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo678ard.png\" alt=\"\" class=\"wp-image-2476\" width=\"581\" height=\"392\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo678ard.png 686w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipbo678ard-300x202.png 300w\" sizes=\"(max-width: 581px) 100vw, 581px\" \/><\/figure>\n\n\n\n<p> <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u6d4b\u8bd5Nginx\u670d\u52a1\u5b89\u88c5\u662f\u5426\u6b63\u786e\uff0c\u4ee3\u7801\u547d\u4ee4\u5982\u4e0b\uff1a<\/strong><\/p>\n\n\n\n<p><strong> \/usr\/local\/nginx\/sbin\/nginx -t     #\u68c0\u67e5nginx\u914d\u7f6e\u6587\u4ef6\uff0c\u8fd4\u56deOK\u548cSuccessful\u5373\u53ef<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB conf]# \/usr\/local\/nginx\/sbin\/nginx -t \nnginx: the configuration file \/usr\/local\/nginx\/conf\/nginx.conf syntax is ok\nnginx: configuration file \/usr\/local\/nginx\/conf\/nginx.conf test is successful<\/code><\/pre>\n\n\n\n<h4>\u56db\u3001Nginx\u5347\u7ea7\u66f4\u65b0<\/h4>\n\n\n\n<p><strong>Nginx Web\u670d\u52a1\u5668\u5b9a\u671f\u66f4\u65b0\uff0c\u5982\u679c\u9700\u8981\u5c06\u4f4e\u7248\u672c\u5347\u7ea7\u6216\u8005\u5c06\u9ad8\u7248\u672c\u964d\u7ea7\uff0c\u5347\u7ea7\u6216\u8005\u964d\u7ea7\u65b9\u6cd5\u5982\u4e0b\uff0c\u5206\u4e3a\u56db\u4e2a\u6b65\u9aa4\uff0c\u5305\u62ec\u8f6f\u4ef6\u4e0b\u8f7d\u3001\u9884\u7f16\u8bd1\u3001\u7f16\u8bd1\u3001\u914d\u7f6e\uff0c\u5177\u4f53\u65b9\u6cd5\u5982\u4e0b\uff1a<\/strong><\/p>\n\n\n\n<p><strong>\u67e5\u770b\u5f53\u524dNginx\u8f6f\u4ef6\u7248\u672c\uff1a<\/strong><\/p>\n\n\n\n<p><strong>\/usr\/local\/nginx\/sbin\/nginx -v       #\u67e5\u770bNginx\u7684\u7b80\u8981\u7248\u672c\u4fe1\u606f<\/strong><\/p>\n\n\n\n<p><strong>\/usr\/local\/nginx\/sbin\/nginx -V       #\u80fd\u591f\u770b\u5230\u7248\u672c\u4fe1\u606f\u3001\u4f7f\u7528\u7684\u7f16\u8bd1\u5668\u3001\u4ee5\u53ca\u7f16\u8bd1\u8fdb\u53bb\u7684\u6a21\u5757\u4fe1\u606f\uff1b<\/strong><\/p>\n\n\n\n<p><strong>\u8f6f\u4ef6\u4e0a\u4f20\u5e76\u4e14\u89e3\u538b\uff1anginx-1.14.2<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"695\" height=\"177\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb68686oard.png\" alt=\"\" class=\"wp-image-2477\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb68686oard.png 695w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clipb68686oard-300x76.png 300w\" sizes=\"(max-width: 695px) 100vw, 695px\" \/><\/figure>\n\n\n\n<p><strong>\u9884\u7f16\u8bd1\uff1a\u6dfb\u52a0\u4e0auser \u3001group\u53c2\u6570<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB ~]# cd nginx-1.14.2\n[root@LB nginx-1.14.2]# .\/configure --prefix=\/usr\/local\/nginx --with-http_dav_module --with-http_stub_status_module --with-http_addition_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --usre=www --group=www\n<\/code><\/pre>\n\n\n\n<p><strong>\u7f16\u8bd1\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB nginx-1.14.2]# make<\/code><\/pre>\n\n\n\n<p><strong>\u914d\u7f6e\uff1a<\/strong><\/p>\n\n\n\n<p><strong>#\u5c06\u539f\u6765Nginx\u7684\u542f\u52a8\u6587\u4ef6\u5907\u4efd\u4e00\u4e0b;<\/strong><\/p>\n\n\n\n<p><strong>#\u5728\u65b0\u7684Nginx\u7684\u6e90\u7801\u5b89\u88c5\u5305\u5185\u7684objs\u76ee\u5f55\u4e0b\u5c06\u65b0\u7684nginx\u6587\u4ef6cp\u5230\/usr\/local\/nginx\/sbin\/\u4e0b\u53bb<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB nginx-1.14.2]# mv \/usr\/local\/nginx\/sbin\/nginx \/usr\/local\/nginx\/sbin\/nginx.old \n[root@LB nginx-1.14.2]# cp objs\/nginx \/usr\/local\/nginx\/sbin\/ -a\n[root@LB nginx-1.14.2]# cd \/usr\/local\/nginx\/sbin\/\n[root@LB sbin]# ls\nnginx  nginx.old\n[root@LB sbin]# <\/code><\/pre>\n\n\n\n<p><strong>#\u68c0\u6d4bNginx\u7684\u914d\u7f6e\uff1b<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB sbin]# \/usr\/local\/nginx\/sbin\/nginx -t\nnginx: the configuration file \/usr\/local\/nginx\/conf\/nginx.conf syntax is ok\nnginx: configuration file \/usr\/local\/nginx\/conf\/nginx.conf test is successful<\/code><\/pre>\n\n\n\n<p><strong>\u9a8c\u8bc1\uff1a<\/strong><\/p>\n\n\n\n<p><strong>#\u5c06\u539f\u6765\u7684index.html\u4fee\u6539\u56de\u6765<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB sbin]# mv \/usr\/local\/nginx\/html\/index.html.bak \/usr\/local\/nginx\/html\/index.html<\/code><\/pre>\n\n\n\n<p><strong>#\u5e73\u6ed1\u91cd\u542fNginx\u3001\u67e5\u770bversion\uff1b<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@LB sbin]# .\/nginx -s reload\n[root@LB sbin]# .\/nginx -v      \nnginx version: nginx\/1.14.2<\/code><\/pre>\n\n\n\n<p><strong>#\u8bbf\u95ee\u9875\u9762\u6b63\u5e38\uff1b<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"388\" src=\"http:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board-1-1024x388.png\" alt=\"\" class=\"wp-image-2478\" srcset=\"https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board-1-1024x388.png 1024w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board-1-300x114.png 300w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board-1-768x291.png 768w, https:\/\/www.charflower.com\/wp-content\/uploads\/2020\/10\/clip3456board-1.png 1147w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p> <strong>\u672c\u535a\u5ba2\u4e2dNginx\u76f8\u5173\u535a\u6587\uff0c\u90fd\u662f\u4ece\u5934\u5230\u5c3e\u76f8\u5173\u8054\u7684\uff0c\u9700\u8981\u8bfb\u8005\u4ece\u5934\u81f3\u5c3e\u9605\u8bfb\uff1b<\/strong> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5e38\u89c1\u7684\u4e24\u79cd\u67b6\u6784\uff1a\u8d1f\u8f7d\u5747\u8861\u548c\u9ad8\u53ef\u7528 \u96c6\u7fa4\uff1a\u901a\u8fc7\u591a\u53f0\u8bbe\u5907\u534f\u8c03\u8fd0\u4f5c\u2014\u6ee1\u8db3\u6211\u4eec\u4e00\u4e2a\u529f\u80fd \u8d1f\u8f7d\u5747\u8861\uff1a\u8ba9\u539f\u672c\u4e00\u6761\u7ebf \u53d8\u6210\u591a&hellip; <a class=\"more-link\" href=\"https:\/\/www.charflower.com\/?p=2461\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Nginx-\u5165\u95e8\u4e0e\u5b89\u88c5<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":2492,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[72],"tags":[45,92],"_links":{"self":[{"href":"https:\/\/www.charflower.com\/index.php?rest_route=\/wp\/v2\/posts\/2461"}],"collection":[{"href":"https:\/\/www.charflower.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.charflower.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.charflower.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.charflower.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2461"}],"version-history":[{"count":11,"href":"https:\/\/www.charflower.com\/index.php?rest_route=\/wp\/v2\/posts\/2461\/revisions"}],"predecessor-version":[{"id":2513,"href":"https:\/\/www.charflower.com\/index.php?rest_route=\/wp\/v2\/posts\/2461\/revisions\/2513"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.charflower.com\/index.php?rest_route=\/wp\/v2\/media\/2492"}],"wp:attachment":[{"href":"https:\/\/www.charflower.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.charflower.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.charflower.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}