{"id":22770,"date":"2025-04-19T06:27:07","date_gmt":"2025-04-18T22:27:07","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/22770.html"},"modified":"2025-04-19T06:27:07","modified_gmt":"2025-04-18T22:27:07","slug":"%e6%94%b6%e8%97%8f%ef%bc%81%e5%89%8d%e7%ab%af%e5%a6%82%e4%bd%95%e5%b0%86%e9%a1%b9%e7%9b%ae%e9%83%a8%e7%bd%b2%e5%88%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%88nginx%ef%bc%89-%e7%b2%be%e7%ae%80%e7%89%88","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/22770.html","title":{"rendered":"\u6536\u85cf\uff01\u524d\u7aef\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\uff08Nginx\uff09-\u7cbe\u7b80\u7248"},"content":{"rendered":"<h3>\u524d\u8a00<\/h3>\n<p>\u6700\u8fd1\u5728\u516c\u53f8\u90e8\u7f72\u9879\u76ee\u65f6\u9047\u4e0a\u4e86\u4e00\u70b9\u5173\u4e8enginx\u7684\u95ee\u9898&#xff0c;\u4e8e\u662f\u5c31\u6709\u4e86\u8fd9\u7bc7&#xff0c;\u540c\u6837\u9002\u5408\u524d\u7aef\u7b2c\u4e00\u6b21\u63a5\u89e6\u9700\u8981\u542fnginx\u8bbf\u95ee\u7684\u9879\u76ee<\/p>\n<p>\u4e3b\u8981\u9002\u5408\u5c0f\u767d\u670b\u53cb&#xff0c;nginx\u662f\u4ec0\u4e48&#xff0c;nginx\u6709\u4ec0\u4e48\u7528&#xff0c;\u6700\u540e\u5230nginx\u7684\u5b9e\u9645\u5e94\u7528&#xff0c;\u9879\u76ee\u90e8\u7f72\u3002<\/p>\n<h3>nginx<\/h3>\n<p>\u516c\u53f8\u9879\u76ee\u521a\u521a\u4e0a\u7ebf&#xff0c;\u7528\u6237\u91cf\u5c11\u8bbf\u95ee\u91cf\u4e0d\u5927&#xff0c;\u5e76\u53d1\u91cf\u4f4e&#xff0c;\u4e00\u4e2ajar\u5305\u542f\u52a8\u5e94\u7528\u5c31\u80fd\u591f\u89e3\u51b3\u95ee\u9898\u4e86\u3002\u4f46\u662f\u968f\u7740\u9879\u76ee\u7684\u4e0d\u65ad\u6269\u5927&#xff0c;\u7528\u6237\u4f53\u91cf\u5927\u589e\u52a0&#xff0c;\u4e00\u53f0\u670d\u52a1\u5668\u53ef\u80fd\u5c31\u65e0\u6cd5\u6ee1\u8db3\u6211\u4eec\u7684\u9700\u6c42\u4e86&#xff08;\u5f53\u521d\u662f\u4e00\u4e2a\u4eba\u7528\u4e00\u4e2a\u670d\u52a1\u5668&#xff0c;\u73b0\u5728\u662f\u591a\u4eba\u7528\u4e00\u4e2a\u670d\u52a1\u5668&#xff0c;\u65f6\u95f4\u957f\u4e86\u670d\u52a1\u5668\u90fd\u8981\u7ea2\u6e29&#xff09;\u3002<\/p>\n<p>\u4e8e\u662f\u4e4e&#xff0c;\u6211\u4eec\u5c31\u4f1a\u60f3\u7740\u589e\u52a0\u670d\u52a1\u5668&#xff0c;\u90a3\u4e48\u6211\u4eec\u591a\u4e2a\u9879\u76ee\u5c31\u542f\u52a8\u5728\u591a\u4e2a\u670d\u52a1\u5668\u4e0a\u9762&#xff0c;\u7528\u6237\u9700\u8981\u8bbf\u95ee&#xff0c;\u5c31\u9700\u8981\u505a\u4e00\u4e2a\u4ee3\u7406\u670d\u52a1\u5668&#xff0c;\u901a\u8fc7\u4ee3\u7406\u8bf7\u6c42\u670d\u52a1\u5668\u6765\u505a\u524d\u540e\u7aef\u4e4b\u95f4\u7684\u8f6c\u53d1\u548c\u8bf7\u6c42\u5305\u62ec\u8de8\u57df\u7b49\u7b49\u95ee\u9898\u3002<\/p>\n<p>\u90a3\u4e48\u5230\u8fd9\u5c31\u4e0d\u5f97\u4e0d\u8bf4\u4e00\u4e0bnginx\u7684\u53cd\u5411\u4ee3\u7406\u4e86&#xff0c;\u6b63\u5411\u4ee3\u7406\u6307\u7684\u5176\u5b9e\u5c31\u662f\u6bd4\u5982\u6211\u4eec\u901a\u8fc7VPN\u53bb\u8bf7\u6c42xxx&#xff0c;\u8fd9\u91cc\u5c31\u662f\u56e0\u4e3a\u7528\u5230\u4e86\u5176\u4ed6\u5730\u65b9\u7684\u4ee3\u7406\u670d\u52a1\u5668&#xff0c;\u8fd9\u662f\u4e00\u4e2a\u4ece\u5ba2\u6237\u7aef\u5230\u670d\u52a1\u7aef\u7684\u8fc7\u7a0b&#xff0c;\u7136\u800c\u53cd\u5411\u4ee3\u7406\u5176\u5b9e\u5c31\u662f&#xff0c;\u56e0\u4e3a\u6211\u4eec\u6709\u591a\u4e2a\u670d\u52a1\u5668&#xff0c;\u6700\u540e\u90fd\u6620\u5c04\u5230\u4e86\u4ee3\u7406\u670d\u52a1\u5668\u8eab\u4e0a&#xff0c;\u5ba2\u6237\u7aef\u6700\u7ec8\u8bbf\u95ee\u7684\u90fd\u662f\u4f8b\u5982&#xff1a;baidu.com&#xff0c;\u4f46\u662f\u4e8b\u5b9e\u4e0a\u4ed6\u5e95\u4e0b\u662f\u6709\u591a\u53f0\u670d\u52a1\u5668\u7684\u3002<\/p>\n<p>\u65e2\u7136\u4ed6\u6709\u591a\u53f0\u670d\u52a1\u5668&#xff0c;\u6bcf\u53f0\u670d\u52a1\u5668\u7684\u6027\u80fd&#xff0c;\u5404\u79cd\u6761\u4ef6\u90fd\u662f\u4e0d\u540c\u7684&#xff0c;\u8fd9\u91cc\u5c31\u8981\u8bf4\u5230nginx\u7684\u53e6\u4e00\u4e2a\u80fd\u529b\u2014\u8d1f\u8f7d\u5747\u8861&#xff0c;\u53ef\u4ee5\u7ed9\u4e0d\u540c\u7684\u670d\u52a1\u5668\u589e\u52a0\u4e0d\u540c\u7684\u6743\u91cd&#xff0c;\u80fd\u529b\u66f4\u5f3a\u7684\u670d\u52a1\u5668\u53ef\u4ee5\u589e\u5927\u4ed6\u7684\u8d1f\u8377&#xff0c;\u51cf\u8f7b\u5176\u4ed6\u670d\u52a1\u5668\u7684\u8d1f\u8377<\/p>\n<p>\u8fd9\u5c31\u662f\u5927\u5bb6\u5e38\u8bf4\u7684nginx:Nginx \u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684 HTTP \u548c\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668&#xff0c;\u5b83\u8fd8\u652f\u6301 IMAP\/POP3\/SMTP \u4ee3\u7406\u670d\u52a1\u5668\u3002<\/p>\n<p>nginx\u7684\u7279\u70b9&#xff1a;<\/p>\n<li>\u9ad8\u6027\u80fd&#xff1a;\n<ul>\n<li>\u9ad8\u5e76\u53d1\u8fde\u63a5\u5904\u7406\u80fd\u529b&#xff1a;Nginx \u4f7f\u7528\u5f02\u6b65\u4e8b\u4ef6\u9a71\u52a8\u6a21\u578b&#xff08;\u5982 epoll, kqueue \u7b49&#xff09;&#xff0c;\u80fd\u591f\u9ad8\u6548\u5730\u5904\u7406\u5927\u91cf\u5e76\u53d1\u8fde\u63a5\u3002<\/li>\n<li>\u4f4e\u8d44\u6e90\u6d88\u8017&#xff1a;\u4e0e Apache \u76f8\u6bd4&#xff0c;Nginx \u5728\u76f8\u540c\u786c\u4ef6\u73af\u5883\u4e0b\u901a\u5e38\u6d88\u8017\u66f4\u5c11\u7684\u5185\u5b58\u548c\u5176\u4ed6\u7cfb\u7edf\u8d44\u6e90\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u7a33\u5b9a\u6027&#xff1a;\n<ul>\n<li>\u8fd0\u884c\u7a33\u5b9a&#xff1a;\u5728\u9ad8\u8d1f\u8f7d\u60c5\u51b5\u4e0b\u4f9d\u7136\u4fdd\u6301\u7a33\u5b9a\u8fd0\u884c&#xff0c;\u5d29\u6e83\u6216\u9519\u8bef\u7684\u53d1\u751f\u7387\u8f83\u4f4e\u3002<\/li>\n<li>\u5e73\u6ed1\u5347\u7ea7&#xff1a;\u53ef\u4ee5\u5728\u4e0d\u505c\u6b62\u670d\u52a1\u7684\u60c5\u51b5\u4e0b\u8fdb\u884c\u5347\u7ea7\u6216\u914d\u7f6e\u66f4\u6539\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u4e30\u5bcc\u7684\u529f\u80fd\u96c6&#xff1a;\n<ul>\n<li>\u53cd\u5411\u4ee3\u7406&#xff1a;\u53ef\u4ee5\u4f5c\u4e3a\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668&#xff0c;\u5c06\u8bf7\u6c42\u8f6c\u53d1\u5230\u540e\u7aef\u670d\u52a1\u5668\u3002<\/li>\n<li>URL \u91cd\u5199&#xff1a;\u901a\u8fc7\u7b80\u5355\u7684\u914d\u7f6e\u5373\u53ef\u5b9e\u73b0\u590d\u6742\u7684 URL \u91cd\u5199\u89c4\u5219\u3002<\/li>\n<li>\u52a8\u6001\u5185\u5bb9\u4e0e\u9759\u6001\u5185\u5bb9\u5206\u79bb&#xff1a;\u53ef\u4ee5\u914d\u7f6e\u4e3a\u53ea\u5904\u7406\u9759\u6001\u6587\u4ef6\u8bf7\u6c42&#xff0c;\u800c\u52a8\u6001\u8bf7\u6c42\u5219\u4ea4\u7ed9\u540e\u7aef\u5e94\u7528\u670d\u52a1\u5668\u5904\u7406\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u9ad8\u5ea6\u53ef\u914d\u7f6e\u6027&#xff1a;\n<ul>\n<li>\u7075\u6d3b\u7684\u914d\u7f6e\u9009\u9879&#xff1a;\u53ef\u4ee5\u6839\u636e\u9700\u8981\u5b9a\u5236\u5404\u79cd\u914d\u7f6e\u9009\u9879&#xff0c;\u4ee5\u9002\u5e94\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u3002<\/li>\n<li>\u5bb9\u6613\u7ba1\u7406&#xff1a;\u914d\u7f6e\u6587\u4ef6\u7ed3\u6784\u6e05\u6670&#xff0c;\u6613\u4e8e\u7406\u89e3\u548c\u4fee\u6539\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u8d1f\u8f7d\u5747\u8861&#xff1a;\n<ul>\n<li>\u652f\u6301\u591a\u79cd\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5&#xff0c;\u4f8b\u5982\u8f6e\u8be2\u3001\u52a0\u6743\u8f6e\u8be2\u3001\u6700\u5c11\u8fde\u63a5\u6570\u7b49&#xff0c;\u53ef\u4ee5\u5e2e\u52a9\u5206\u6563\u5230\u591a\u4e2a\u540e\u7aef\u670d\u52a1\u5668\u7684\u6d41\u91cf\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u7f13\u5b58\u529f\u80fd&#xff1a;\n<ul>\n<li>\u53ef\u7528\u4f5cHTTP\u7f13\u5b58\u670d\u52a1\u5668&#xff0c;\u51cf\u5c11\u5bf9\u540e\u7aef\u6570\u636e\u5e93\u6216\u5e94\u7528\u670d\u52a1\u5668\u7684\u538b\u529b\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u5b89\u5168\u6027&#xff1a;\n<ul>\n<li>\u63d0\u4f9b SSL\/TLS \u52a0\u5bc6\u652f\u6301&#xff0c;\u4fdd\u969c\u6570\u636e\u4f20\u8f93\u5b89\u5168\u3002<\/li>\n<li>\u53ef\u4ee5\u8bbe\u7f6e\u8bbf\u95ee\u63a7\u5236\u3001\u9632\u706b\u5899\u89c4\u5219\u7b49\u6765\u589e\u5f3a\u5b89\u5168\u6027\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u6a21\u5757\u5316\u67b6\u6784&#xff1a;\n<ul>\n<li>\u652f\u6301\u7b2c\u4e09\u65b9\u6a21\u5757\u6269\u5c55\u529f\u80fd&#xff0c;\u6bd4\u5982 Nginx&#043;Lua \u4f7f\u5f97\u5f00\u53d1\u8005\u53ef\u4ee5\u5728 Nginx \u4e2d\u76f4\u63a5\u4f7f\u7528 Lua \u811a\u672c\u8bed\u8a00\u7f16\u5199\u63d2\u4ef6\u6216\u5904\u7406\u903b\u8f91\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u65e5\u5fd7\u4e0e\u76d1\u63a7&#xff1a;\n<ul>\n<li>\u8be6\u7ec6\u7684\u8bbf\u95ee\u548c\u9519\u8bef\u65e5\u5fd7\u8bb0\u5f55&#xff0c;\u4fbf\u4e8e\u6545\u969c\u6392\u67e5\u548c\u6027\u80fd\u5206\u6790\u3002<\/li>\n<li>\u652f\u6301\u5b9e\u65f6\u76d1\u63a7\u548c\u7edf\u8ba1&#xff0c;\u65b9\u4fbf\u7ba1\u7406\u5458\u4e86\u89e3\u5f53\u524d\u7cfb\u7edf\u7684\u72b6\u6001\u3002<\/li>\n<\/ul>\n<\/li>\n<h3>nginx\u4e0b\u8f7d<\/h3>\n<p>nginx.org\/ \u5927\u5bb6\u81ea\u884c\u4e0b\u8f7d&#xff0c;\u6211\u4e0b\u8f7d\u7684\u662f\u4e00\u4e2a\u7a33\u5b9a\u7248\u672c&#xff0c;\u4ee5\u9632\u4e07\u4e00\u3002\u4e0b\u8f7d\u5b8c\u6bd5\u4e4b\u540e\u5927\u5bb6\u81ea\u884c\u89e3\u538b\u5373\u53ef&#xff08;\u9ed8\u8ba4\u5927\u5bb6\u662fwindows\u7cfb\u7edf&#xff09;&#xff0c;\u89e3\u538b\u5b8c\u6bd5\u4e4b\u540e&#xff0c;\u53ef\u4ee5\u770b\u5230nginx.exe\u5c31\u662f\u6211\u4eec\u7684\u542f\u52a8\u6587\u4ef6&#xff0c;conf\u5c31\u662f\u914d\u7f6e\u6587\u4ef6&#xff0c;nginx.config\u4e2d\u53ef\u4ee5\u770b\u5230server\u7684listen\u76d1\u542c\u7aef\u53e3\u4e3a80&#xff0c;\u8fd9\u610f\u5473\u7740\u5f53\u6211\u4eec\u8bbf\u95ee\u4e8680\u7aef\u53e3\u5c31\u4f1a\u88abnginx\u62e6\u622a&#xff0c;\u9996\u5148\u542f\u52a8nginx&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u53cc\u51fbnginx.exe\u4e5f\u53ef\u4ee5\u901a\u8fc7cmd\u547d\u4ee4\u884c\u76f4\u63a5\u8f93\u5165nginx.exe\u8fd0\u884c&#xff08;\u63a8\u8350&#xff0c;\u56e0\u4e3a\u8fd9\u6837\u4e0d\u4f1a\u5173\u95ed\u7a97\u53e3&#xff0c;\u53cc\u51fb\u7684\u8bdd\u5c31\u662f\u4e00\u95ea\u800c\u8fc7\u4e86&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418222703-6802d1b75efe1.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u63a5\u4e0b\u6765\u6211\u4eec\u6d4f\u89c8\u5668\u8bbf\u95eelocalhost:80 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418222704-6802d1b803593.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u542f\u52a8\u6210\u529f\u3002<\/p>\n<h3>nginx\u5e38\u7528\u547d\u4ee4<\/h3>\n<p>\u505c\u6b62&#xff1a;nginx.exe -s stop \u5b89\u5168\u9000\u51fa&#xff1a;nginx.exe -s quit \u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6&#xff1a;nginx.exe -s reload&#xff08;\u5e38\u7528&#xff09;\u4f8b\u5982\u6211\u4eec\u66f4\u6539\u4e86\u7aef\u53e3 \u67e5\u770bnginx\u8fdb\u7a0b&#xff1a;ps aux|grep nginx<\/p>\n<h3>\u5b9e\u9645\u5e94\u7528<\/h3>\n<p>\u4e0b\u8f7d\u5b8c\u6bd5\u540e\u6253\u5f00\u53ef\u4ee5\u770b\u5230&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418222704-6802d1b8cc710.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418222704-6802d1b8ee1a0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4e8e\u662f\u6211\u4eec\u5efa\u7acbaa\u3001bb\u4e24\u4e2a\u6587\u4ef6\u5939&#xff0c;\u6211\u4eec\u5c06index.html \u5206\u522b\u653e\u5165aa\u548cbb&#xff0c;\u8fd9\u4e24\u4e2a\u9875\u9762\u90fd\u6253\u4e0a\u81ea\u5df1\u7684\u6807\u8bb0aa\/bb <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418222705-6802d1b917b5e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7136\u540e\u6211\u4eec\u5bf9nginx\u8fdb\u884c\u914d\u7f6e nginx.conf<\/p>\n<p>server <span class=\"token punctuation\">{<\/span><br \/>\n       listen       <span class=\"token number\">8001<\/span><span class=\"token punctuation\">;<\/span><br \/>\n       server_name  localhost<span class=\"token punctuation\">;<\/span><\/p>\n<p>       location <span class=\"token operator\">\/<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n           root   html<span class=\"token operator\">\/<\/span>aa<span class=\"token punctuation\">;<\/span><br \/>\n           index  index<span class=\"token punctuation\">.<\/span>html index<span class=\"token punctuation\">.<\/span>htm<span class=\"token punctuation\">;<\/span><br \/>\n       <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    server <span class=\"token punctuation\">{<\/span><br \/>\n       listen       <span class=\"token number\">8002<\/span><span class=\"token punctuation\">;<\/span><br \/>\n       server_name  localhost<span class=\"token punctuation\">;<\/span><\/p>\n<p>       location <span class=\"token operator\">\/<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n           root   html<span class=\"token operator\">\/<\/span>bb<span class=\"token punctuation\">;<\/span><br \/>\n           index  index<span class=\"token punctuation\">.<\/span>html index<span class=\"token punctuation\">.<\/span>htm<span class=\"token punctuation\">;<\/span><br \/>\n       <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5982\u679c\u6ca1\u7ed3\u675f&#xff0c;\u8bb0\u5f97reload <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418222705-6802d1b9b1f25.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>nginx<span class=\"token punctuation\">.<\/span>exe <span class=\"token operator\">&#8211;<\/span>s reload<\/p>\n<p>\u63a5\u4e0b\u6765\u6211\u4eec\u653e\u4e00\u4e2a\u9879\u76ee\u8fdb\u53bb&#xff0c;\u6253\u5305\u540e\u653e\u5165html\u4e2d<\/p>\n<p>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6&#xff0c;\u7136\u540ereload<\/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        server_name  localhost<span class=\"token punctuation\">;<\/span><\/p>\n<p>        #charset koi8<span class=\"token operator\">&#8211;<\/span>r<span class=\"token punctuation\">;<\/span><\/p>\n<p>        #access_log  logs<span class=\"token operator\">\/<\/span>host<span class=\"token punctuation\">.<\/span>access<span class=\"token punctuation\">.<\/span>log  main<span class=\"token punctuation\">;<\/span><\/p>\n<p>        location <span class=\"token operator\">\/<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n            root   html<span class=\"token operator\">\/<\/span>dist<span class=\"token punctuation\">;<\/span><br \/>\n            index  index<span class=\"token punctuation\">.<\/span>html index<span class=\"token punctuation\">.<\/span>htm<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><\/p>\n<p>\u7136\u540e\u6211\u4eec\u8bbf\u95eelocalhost&#xff0c;\u7aef\u53e3\u9ed8\u8ba4\u662f80\u6240\u4ee5\u4e0d\u7528\u5199&#xff0c;\u5982\u679c\u5931\u8d25&#xff0c;\u53ef\u80fd\u662freload\u5931\u8d25&#xff0c;\u518d\u6b21reload\u5c31\u53ef<\/p>\n<p>\u5176\u4ed6\u914d\u7f6e\u95ee\u9898<\/p>\n<p>Nginx\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6(conf\/nginx.conf)\u6309\u4ee5\u4e0b\u7ed3\u6784\u7ec4\u7ec7&#xff1a;<\/p>\n<ul>\n<li>\u5168\u5c40\u5757 \u4e0eNginx\u8fd0\u884c\u76f8\u5173\u7684\u5168\u5c40\u8bbe\u7f6e<\/li>\n<li>events \u4e0e\u7f51\u7edc\u8fde\u63a5\u6709\u5173\u7684\u8bbe\u7f6e<\/li>\n<li>http \u4ee3\u7406\u3001\u7f13\u5b58\u3001\u65e5\u5fd7\u3001\u865a\u62df\u4e3b\u673a\u7b49\u7684\u914d\u7f6e<\/li>\n<li>server \u865a\u62df\u4e3b\u673a\u7684\u53c2\u6570\u8bbe\u7f6e&#xff08;\u4e00\u4e2ahttp\u5757\u53ef\u5305\u542b\u591a\u4e2aserver\u5757&#xff09;<\/li>\n<li>location \u5b9a\u4e49\u8bf7\u6c42\u8def\u7531\u53ca\u9875\u9762\u5904\u7406\u65b9\u5f0f<\/li>\n<\/ul>\n<p>\u524d\u7aef\u5f00\u53d1\u4e2d\u7ecf\u5e38\u4f1a\u9047\u5230\u8de8\u57df\u95ee\u9898&#xff0c;nginx\u53ef\u4ee5\u505a\u4ee3\u7406\u8f7b\u677e\u89e3\u51b3&#xff0c;\u4e8b\u5b9e\u4e0a\u539f\u7406\u548ccors\u4e00\u6837&#xff0c;\u8bbe\u7f6e\u8bf7\u6c42\u5934<\/p>\n<p>server <span class=\"token punctuation\">{<\/span><br \/>\n    location <span class=\"token operator\">\/<\/span>api <span class=\"token punctuation\">{<\/span><br \/>\n        proxy_pass http<span class=\"token operator\">:<\/span><span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>backend_server<span class=\"token punctuation\">;<\/span><br \/>\n        add_header Access<span class=\"token operator\">&#8211;<\/span>Control<span class=\"token operator\">&#8211;<\/span>Allow<span class=\"token operator\">&#8211;<\/span>Origin <span class=\"token operator\">*<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        add_header Access<span class=\"token operator\">&#8211;<\/span>Control<span class=\"token operator\">&#8211;<\/span>Allow<span class=\"token operator\">&#8211;<\/span>Methods <span class=\"token string\">&#039;GET, POST, OPTIONS&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        add_header Access<span class=\"token operator\">&#8211;<\/span>Control<span class=\"token operator\">&#8211;<\/span>Allow<span class=\"token operator\">&#8211;<\/span>Headers <span class=\"token string\">&#039;Origin, Content-Type, Accept&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u7f13\u5b58\u95ee\u9898&#xff1a;<\/p>\n<p>proxy_cache_path <span class=\"token operator\">\/<\/span>data<span class=\"token operator\">\/<\/span>nginx<span class=\"token operator\">\/<\/span>cache levels<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><span class=\"token operator\">:<\/span><span class=\"token number\">2<\/span> keys_zone<span class=\"token operator\">&#061;<\/span>my_cache<span class=\"token operator\">:<\/span>10m max_size<span class=\"token operator\">&#061;<\/span>1g inactive<span class=\"token operator\">&#061;<\/span>60m use_temp_path<span class=\"token operator\">&#061;<\/span>off<span class=\"token punctuation\">;<\/span><\/p>\n<p>server <span class=\"token punctuation\">{<\/span><br \/>\n    location <span class=\"token operator\">\/<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        proxy_cache my_cache<span class=\"token punctuation\">;<\/span><br \/>\n        proxy_pass http<span class=\"token operator\">:<\/span><span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>backend<span class=\"token punctuation\">;<\/span><br \/>\n        add_header <span class=\"token constant\">X<\/span><span class=\"token operator\">&#8211;<\/span>Cache<span class=\"token operator\">&#8211;<\/span>Status $upstream_cache_status<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>https\u63d0\u5347\u5b89\u5168\u6027<\/p>\n<p>server <span class=\"token punctuation\">{<\/span><br \/>\n    listen <span class=\"token number\">443<\/span> ssl<span class=\"token punctuation\">;<\/span><br \/>\n    server_name example<span class=\"token punctuation\">.<\/span>com<span class=\"token punctuation\">;<\/span><\/p>\n<p>    ssl_certificate <span class=\"token operator\">\/<\/span>etc<span class=\"token operator\">\/<\/span>nginx<span class=\"token operator\">\/<\/span>ssl<span class=\"token operator\">\/<\/span>example<span class=\"token punctuation\">.<\/span>com<span class=\"token punctuation\">.<\/span>crt<span class=\"token punctuation\">;<\/span><br \/>\n    ssl_certificate_key <span class=\"token operator\">\/<\/span>etc<span class=\"token operator\">\/<\/span>nginx<span class=\"token operator\">\/<\/span>ssl<span class=\"token operator\">\/<\/span>example<span class=\"token punctuation\">.<\/span>com<span class=\"token punctuation\">.<\/span>key<span class=\"token punctuation\">;<\/span><\/p>\n<p>    location <span class=\"token operator\">\/<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        proxy_pass http<span class=\"token operator\">:<\/span><span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>backend_server<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u4e00\u4e2a\u6bd4\u8f83\u5168\u9762\u7684\u914d\u7f6e<\/p>\n<p># \u5168\u5c40\u6bb5\u914d\u7f6e<br \/>\n# <span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><\/p>\n<p># \u6307\u5b9a\u8fd0\u884cnginx\u7684\u7528\u6237\u6216\u7528\u6237\u7ec4&#xff0c;\u9ed8\u8ba4\u4e3anobody\u3002<br \/>\n#user administrator administrators<span class=\"token punctuation\">;<\/span><\/p>\n<p># \u8bbe\u7f6e\u5de5\u4f5c\u8fdb\u7a0b\u6570&#xff0c;\u901a\u5e38\u8bbe\u7f6e\u4e3a\u7b49\u4e8e<span class=\"token constant\">CPU<\/span>\u6838\u5fc3\u6570\u3002<br \/>\n#worker_processes <span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p># \u6307\u5b9anginx\u8fdb\u7a0b\u7684<span class=\"token constant\">PID<\/span>\u6587\u4ef6\u5b58\u653e\u4f4d\u7f6e\u3002<br \/>\n#pid <span class=\"token operator\">\/<\/span>nginx<span class=\"token operator\">\/<\/span>pid<span class=\"token operator\">\/<\/span>nginx<span class=\"token punctuation\">.<\/span>pid<span class=\"token punctuation\">;<\/span><\/p>\n<p># \u6307\u5b9a\u9519\u8bef\u65e5\u5fd7\u7684\u5b58\u653e\u8def\u5f84\u548c\u65e5\u5fd7\u7ea7\u522b\u3002<br \/>\nerror_log log<span class=\"token operator\">\/<\/span>error<span class=\"token punctuation\">.<\/span>log debug<span class=\"token punctuation\">;<\/span><\/p>\n<p># events\u6bb5\u914d\u7f6e\u4fe1\u606f<br \/>\n# <span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><br \/>\nevents <span class=\"token punctuation\">{<\/span><br \/>\n    # \u8bbe\u7f6e\u7f51\u7edc\u8fde\u63a5\u5e8f\u5217\u5316&#xff0c;\u7528\u4e8e\u9632\u6b62\u591a\u4e2a\u8fdb\u7a0b\u540c\u65f6\u63a5\u53d7\u5230\u65b0\u8fde\u63a5\u7684\u60c5\u51b5&#xff0c;\u8fd9\u79cd\u60c5\u51b5\u79f0\u4e3a<span class=\"token string\">&#034;\u60ca\u7fa4&#034;<\/span>\u3002<br \/>\n    accept_mutex on<span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u8bbe\u7f6e\u4e00\u4e2a\u8fdb\u7a0b\u662f\u5426\u53ef\u4ee5\u540c\u65f6\u63a5\u53d7\u591a\u4e2a\u65b0\u8fde\u63a5\u3002<br \/>\n    multi_accept on<span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u8bbe\u7f6e\u5de5\u4f5c\u8fdb\u7a0b\u7684\u6700\u5927\u8fde\u63a5\u6570\u3002<br \/>\n    worker_connections  <span class=\"token number\">1024<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p># http\u914d\u7f6e\u6bb5&#xff0c;\u7528\u4e8e\u914d\u7f6e<span class=\"token constant\">HTTP<\/span>\u670d\u52a1\u5668\u7684\u53c2\u6570\u3002<br \/>\n# <span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><br \/>\nhttp <span class=\"token punctuation\">{<\/span><br \/>\n    # \u5305\u542b\u6587\u4ef6\u6269\u5c55\u540d\u4e0e<span class=\"token constant\">MIME<\/span>\u7c7b\u578b\u7684\u6620\u5c04\u3002<br \/>\n    include       mime<span class=\"token punctuation\">.<\/span>types<span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u8bbe\u7f6e\u9ed8\u8ba4\u7684<span class=\"token constant\">MIME<\/span>\u7c7b\u578b\u3002<br \/>\n    default_type  application<span class=\"token operator\">\/<\/span>octet<span class=\"token operator\">&#8211;<\/span>stream<span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u5b9a\u4e49\u65e5\u5fd7\u683c\u5f0f\u3002<br \/>\n    log_format myFormat <span class=\"token string\">&#039;$remote_addr\u2013$remote_user [$time_local] $request $status $body_bytes_sent $http_referer $http_user_agent $http_x_forwarded_for&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u6307\u5b9a\u8bbf\u95ee\u65e5\u5fd7\u7684\u5b58\u653e\u8def\u5f84\u548c\u4f7f\u7528\u7684\u683c\u5f0f\u3002<br \/>\n    access_log log<span class=\"token operator\">\/<\/span>access<span class=\"token punctuation\">.<\/span>log myFormat<span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u5141\u8bb8\u4f7f\u7528sendfile\u65b9\u5f0f\u4f20\u8f93\u6587\u4ef6\u3002<br \/>\n    sendfile on<span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u9650\u5236\u6bcf\u6b21\u8c03\u7528sendfile\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002<br \/>\n    sendfile_max_chunk 100k<span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u8bbe\u7f6e\u8fde\u63a5\u7684\u4fdd\u6301\u65f6\u95f4\u3002<br \/>\n    keepalive_timeout <span class=\"token number\">65<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u5b9a\u4e49\u4e00\u4e2a\u4e0a\u6e38\u670d\u52a1\u5668\u7ec4\u3002<br \/>\n    upstream mysvr <span class=\"token punctuation\">{<\/span><br \/>\n      server <span class=\"token number\">127.0<\/span><span class=\"token number\">.0<\/span><span class=\"token number\">.1<\/span><span class=\"token operator\">:<\/span><span class=\"token number\">7878<\/span><span class=\"token punctuation\">;<\/span><br \/>\n      server <span class=\"token number\">192.168<\/span><span class=\"token number\">.10<\/span><span class=\"token number\">.121<\/span><span class=\"token operator\">:<\/span><span class=\"token number\">3333<\/span> backup<span class=\"token punctuation\">;<\/span>  #\u6b64\u670d\u52a1\u5668\u4e3a\u5907\u4efd\u670d\u52a1\u5668\u3002<br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    # \u5b9a\u4e49\u9519\u8bef\u9875\u9762\u7684\u91cd\u5b9a\u5411\u5730\u5740\u3002<br \/>\n    error_page <span class=\"token number\">404<\/span> <span class=\"token literal-property property\">https<\/span><span class=\"token operator\">:<\/span><span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>www<span class=\"token punctuation\">.<\/span>baidu<span class=\"token punctuation\">.<\/span>com<span class=\"token punctuation\">;<\/span><\/p>\n<p>    # \u5b9a\u4e49\u4e00\u4e2a\u865a\u62df\u4e3b\u673a\u3002<br \/>\n    server <span class=\"token punctuation\">{<\/span><br \/>\n        # \u8bbe\u7f6e\u5355\u4e2a\u8fde\u63a5\u4e0a\u7684\u6700\u5927\u8bf7\u6c42\u6b21\u6570\u3002<br \/>\n        keepalive_requests <span class=\"token number\">120<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        # \u8bbe\u7f6e\u76d1\u542c\u7684\u7aef\u53e3\u548c\u5730\u5740\u3002<br \/>\n        listen       <span class=\"token number\">4545<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        server_name  <span class=\"token number\">127.0<\/span><span class=\"token number\">.0<\/span><span class=\"token number\">.1<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        # \u5b9a\u4e49location\u5757&#xff0c;\u7528\u4e8e\u5339\u914d\u7279\u5b9a\u7684\u8bf7\u6c42<span class=\"token constant\">URI<\/span>\u3002<br \/>\n        location  <span class=\"token operator\">~<\/span><span class=\"token operator\">*<\/span><span class=\"token operator\">^<\/span><span class=\"token punctuation\">.<\/span><span class=\"token operator\">&#043;<\/span>$ <span class=\"token punctuation\">{<\/span><br \/>\n           # \u8bbe\u7f6e\u8bf7\u6c42\u7684\u6839\u76ee\u5f55\u3002<br \/>\n           #root path<span class=\"token punctuation\">;<\/span><\/p>\n<p>           # \u8bbe\u7f6e\u9ed8\u8ba4\u9875\u9762\u3002<br \/>\n           #index vv<span class=\"token punctuation\">.<\/span>txt<span class=\"token punctuation\">;<\/span><\/p>\n<p>           # \u5c06\u8bf7\u6c42\u8f6c\u53d1\u5230\u4e0a\u6e38\u670d\u52a1\u5668\u7ec4\u3002<br \/>\n           proxy_pass  http<span class=\"token operator\">:<\/span><span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>mysvr<span class=\"token punctuation\">;<\/span><\/p>\n<p>           # \u5b9a\u4e49\u8bbf\u95ee\u63a7\u5236\u89c4\u5219\u3002<br \/>\n           deny <span class=\"token number\">127.0<\/span><span class=\"token number\">.0<\/span><span class=\"token number\">.1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n           allow <span class=\"token number\">172.18<\/span><span class=\"token number\">.5<\/span><span class=\"token number\">.54<\/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><\/p>\n<h3>\u5c0f\u7ed3<\/h3>\n<p>\u672c\u6587\u4e3b\u8981\u9002\u5408\u5c0f\u767d\u670b\u53cb\u5b66\u4e60nginx\u662f\u4ec0\u4e48\u3001\u7528\u4e8e\u505a\u4ec0\u4e48&#xff0c;nginx\u7684\u5e38\u7528\u547d\u4ee4&#xff0c;nginx\u5982\u4f55\u8fdb\u884c\u914d\u7f6e&#xff0c;\u6700\u540e\u5b9e\u9645\u64cd\u4f5c\u4e00\u6b21\u7b80\u5355\u7684nginx\u3002<\/p>\n<p>&#061;\u8f6c\u8f7d&#061;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf31\u6b21\u3002nginx\u9879\u76ee\u90e8\u7f72_nginx\u90e8\u7f72\u524d\u7aef\u9879\u76ee\u653e\u5728\u54ea\u91cc<\/p>\n","protected":false},"author":2,"featured_media":22764,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[187,117,87,43],"topic":[],"class_list":["post-22770","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-javascript","tag-nginx","tag-87","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6536\u85cf\uff01\u524d\u7aef\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\uff08Nginx\uff09-\u7cbe\u7b80\u7248 - \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\/22770.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6536\u85cf\uff01\u524d\u7aef\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\uff08Nginx\uff09-\u7cbe\u7b80\u7248 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf31\u6b21\u3002nginx\u9879\u76ee\u90e8\u7f72_nginx\u90e8\u7f72\u524d\u7aef\u9879\u76ee\u653e\u5728\u54ea\u91cc\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/22770.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T22:27:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418222703-6802d1b75efe1.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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22770.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/22770.html\",\"name\":\"\u6536\u85cf\uff01\u524d\u7aef\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\uff08Nginx\uff09-\u7cbe\u7b80\u7248 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T22:27:07+00:00\",\"dateModified\":\"2025-04-18T22:27:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/22770.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/22770.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22770.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6536\u85cf\uff01\u524d\u7aef\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\uff08Nginx\uff09-\u7cbe\u7b80\u7248\"}]},{\"@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":"\u6536\u85cf\uff01\u524d\u7aef\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\uff08Nginx\uff09-\u7cbe\u7b80\u7248 - \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\/22770.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6536\u85cf\uff01\u524d\u7aef\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\uff08Nginx\uff09-\u7cbe\u7b80\u7248 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf31\u6b21\u3002nginx\u9879\u76ee\u90e8\u7f72_nginx\u90e8\u7f72\u524d\u7aef\u9879\u76ee\u653e\u5728\u54ea\u91cc","og_url":"https:\/\/www.wsisp.com\/helps\/22770.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T22:27:07+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418222703-6802d1b75efe1.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/22770.html","url":"https:\/\/www.wsisp.com\/helps\/22770.html","name":"\u6536\u85cf\uff01\u524d\u7aef\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\uff08Nginx\uff09-\u7cbe\u7b80\u7248 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T22:27:07+00:00","dateModified":"2025-04-18T22:27:07+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/22770.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/22770.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/22770.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6536\u85cf\uff01\u524d\u7aef\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\uff08Nginx\uff09-\u7cbe\u7b80\u7248"}]},{"@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\/22770","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=22770"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22770\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/22764"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=22770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=22770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=22770"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=22770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}