{"id":320,"date":"2023-02-27T22:07:12","date_gmt":"2023-02-27T14:07:12","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/index.php\/nginx\/nginx%e9%99%90%e5%88%b6%e6%af%8f%e7%a7%92%e8%af%b7%e6%b1%82%e6%ac%a1%e6%95%b0%ef%bc%8c%e9%99%90%e5%88%b6%e6%af%8f%e7%a7%92%e8%bf%9e%e6%8e%a5%e6%ac%a1%e6%95%b0%ef%bc%8c%e4%b8%8b%e8%bd%bd%e9%80%9f\/"},"modified":"2023-05-28T00:45:33","modified_gmt":"2023-05-27T16:45:33","slug":"nginx%e9%99%90%e5%88%b6%e6%af%8f%e7%a7%92%e8%af%b7%e6%b1%82%e6%ac%a1%e6%95%b0%ef%bc%8c%e9%99%90%e5%88%b6%e6%af%8f%e7%a7%92%e8%bf%9e%e6%8e%a5%e6%ac%a1%e6%95%b0%ef%bc%8c%e4%b8%8b%e8%bd%bd%e9%80%9f","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/nginx\/nginx%e9%99%90%e5%88%b6%e6%af%8f%e7%a7%92%e8%af%b7%e6%b1%82%e6%ac%a1%e6%95%b0%ef%bc%8c%e9%99%90%e5%88%b6%e6%af%8f%e7%a7%92%e8%bf%9e%e6%8e%a5%e6%ac%a1%e6%95%b0%ef%bc%8c%e4%b8%8b%e8%bd%bd%e9%80%9f\/","title":{"rendered":"Nginx\u9650\u5236\u6bcf\u79d2\u8bf7\u6c42\u6b21\u6570\uff0c\u9650\u5236\u6bcf\u79d2\u8fde\u63a5\u6b21\u6570\uff0c\u4e0b\u8f7d\u901f\u5ea6\u9650\u5236"},"content":{"rendered":"<div class=\"wxsyncmain\">\n<section style=\"margin-bottom: 0px; padding: 3px 10px; outline: 0px; max-width: 100%; box-sizing: border-box; color: #222222; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: left; white-space: normal; display: inline-block; vertical-align: top; width: auto; flex: 100 100 0%; align-self: stretch; height: auto; background-color: #25b4aa; visibility: visible; overflow-wrap: break-word !important; border: 2px solid #25b4aa;\">\n<section style=\"outline: 0px; max-width: 100%; box-sizing: border-box; color: #25b4aa; text-align: justify; visibility: visible; overflow-wrap: break-word !important;\">\n<p style=\"outline: 0px; max-width: 100%; box-sizing: border-box; visibility: visible; overflow-wrap: break-word !important;\">\n<\/section>\n<\/section>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u4e3a\u4e86\u9632\u6b62\u7f51\u7ad9\u88ab\u6076\u610f\u653b\u51fb\uff0c\u603b\u662f\u9700\u8981\u505a\u4e00\u4e9b\u9632\u62a4\u63aa\u65bd<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u6700\u5916\u5c42\u7684web\u670d\u52a1\u5668\u662fNginx\uff0c\u4e8e\u662f\u5bfb\u627e nginx \u7684\u4e00\u4e9b\u5173\u4e8e\u9632\u62a4\u63aa\u65bd\u7684\u914d\u7f6e\uff0c\u8bb0\u5f55\u5728\u6b64<\/p>\n<h1 style=\"box-sizing: border-box; cursor: var(--cursor-default); font-size: 24px; margin-top: 20px; margin-bottom: 10px; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; word-break: break-all;\">\u4e00\u4e9b\u53d8\u91cf<\/h1>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u9996\u5148\u5217\u4e3e\u51fa\u4f1a\u4f7f\u7528\u5230\u7684\u4e00\u4e9b\u53d8\u91cf<\/p>\n<table style=\"width: 768px;\" width=\"825\">\n<thead style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\n<tr style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\n<th style=\"box-sizing: border-box; cursor: var(--cursor-default); padding: 8px; text-align: left; word-break: break-all; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom-width: 2px;\">\u53d8\u91cf\u540d<\/th>\n<th style=\"box-sizing: border-box; cursor: var(--cursor-default); padding: 8px; text-align: left; word-break: break-all; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom-width: 2px;\">\u7b80\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\n<tr style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all; background-color: #f9f9f9;\">\n<td style=\"box-sizing: border-box; cursor: var(--cursor-default); padding: 8px; word-break: break-all; line-height: 1.42857; vertical-align: top;\">$binary_remote_addr<\/td>\n<td style=\"box-sizing: border-box; cursor: var(--cursor-default); padding: 8px; word-break: break-all; line-height: 1.42857; vertical-align: top;\">\u5ba2\u6237\u7aefIP<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\n<td style=\"box-sizing: border-box; cursor: var(--cursor-default); padding: 8px; word-break: break-all; line-height: 1.42857; vertical-align: top;\">$server_name<\/td>\n<td style=\"box-sizing: border-box; cursor: var(--cursor-default); padding: 8px; word-break: break-all; line-height: 1.42857; vertical-align: top;\">\u57df\u540d\uff0cHOST<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1 style=\"box-sizing: border-box; cursor: var(--cursor-default); font-size: 24px; margin-top: 20px; margin-bottom: 10px; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; word-break: break-all;\">\u9650\u5236\u8bf7\u6c42\u6570<\/h1>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u9996\u5148\u9700\u8981\u5b9a\u4e49\u9650\u5236\u533a\u57df\uff0c\u5728 http \u52a0\u5165\u4ee5\u4e0b\u914d\u7f6e<\/p>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">limit_req_zone $binary_remote_addr zone=testip:10m rate=5r\/s;\n<\/code><\/pre>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u5176\u4e2d testip \u4e3a\u533a\u57df\u540d\u5b57\uff0c\u540e\u9762\u7684 10m \u4ee3\u8868\u8bb0\u5f55\u7684\u7f13\u5b58\u6700\u5927\u5185\u5b58<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">rate \u4ee3\u8868\u8bbf\u95ee\u9891\u7387\u9650\u5236\uff0cbinary_remote_addr\u4ee3\u8868\u9650\u5236\u76f8\u540cip\uff0c<span style=\"box-sizing: border-box; cursor: var(--cursor-default); font-weight: bold; word-break: break-all;\">\u76f8\u540cip\u6bcf\u79d2\u9650\u5236\u8bbf\u95ee\u4e3a\u4e94\u6b21<\/span>\u00a0\uff0c\u65f6\u95f4\u5355\u4f4d\u4e5f\u53ef\u4ee5\u4e3a m(\u5206\u949f)<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u7136\u540e\u5728\u9700\u8981\u9650\u5236\u7684 server \u5185\u52a0\u5165\u4ee5\u4e0b\u914d\u7f6e\u6765\u4f7f\u7528<\/p>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">limit_req zone=testip burst=10 nodelay;\n<\/code><\/pre>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u5176\u4e2dtestip\u4e3a\u4e4b\u524d\u53d6\u7684\u9650\u5236\u533a\u57df\u540d\u79f0\uff0c\u53ef\u4ee5\u968f\u4fbf\u8d77<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">burst\u8bbe\u7f6e\u7f13\u5b58\u533a\u5927\u5c0f\uff0c\u5f53\u8d85\u8fc7\u4e86\u8bbf\u95ee\u9891\u7387\u65f6\u8bf7\u6c42\u653e\u7f6e\u5728\u6b64\u7f13\u5b58\u533a<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">nodelay\u4ee3\u8868\u8d85\u8fc7\u9650\u5236\u5e76\u4e14\u7f13\u5b58\u533a\u4e5f\u6ee1\u4e86\u5c31\u76f4\u63a5\u54cd\u5e94503\uff0c\u5982\u679c\u4e0d\u52a0\uff0c\u8bf7\u6c42\u4f1a\u7ee7\u7eed\u6392\u961f<\/p>\n<h2 style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 22px; word-break: break-all;\">\u9650\u5236\u76f8\u540cip\uff0c\u6bcf\u79d2\u53ea\u5141\u8bb8\u4e00\u4e2a\u8bf7\u6c42<\/h2>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">http {\n\tlimit_req_zone $binary_remote_addr zone=testip:10m rate=1r\/s;\n\tserver {\n\t\tlocation \/ {\n<span style=\"box-sizing: border-box; cursor: var(--cursor-default); color: #bbb529; word-break: break-all;\">\t\t\t# <\/span><span style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\u53ef\u4ee5\u653e\u5728 http,server,location<\/span>\n\t\t\tlimit_req zone=testip;\n\t\t}\n\t}\n}\n<\/code><\/pre>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u91cd\u542f nginx \u5237\u65b0\u4e00\u4e0b\u6d4f\u89c8\u5668\uff0c\u53d1\u73b0\u9664\u4e86\u7b2c\u4e00\u4e2a\u8bf7\u6c42\uff0c\u5176\u4f59\u7684\u90fd\u662f 503\uff08high\u9ad8\u4eae\u63d2\u4ef6\u662f\u7528\u7684cdn\uff0c\u6240\u4ee5\u6ca1\u88ab\u9650\u5236\uff09<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" style=\"box-sizing: border-box; cursor: var(--cursor-default); vertical-align: middle; word-break: break-all; border: 0px initial initial;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004158757.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-ratio=\"1.04149377593361\" data-type=\"png\" data-w=\"241\" \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"box-sizing: border-box; cursor: var(--cursor-default); vertical-align: middle; word-break: break-all; border: 0px initial initial;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004158757.png\" data-ratio=\"1.04149377593361\" data-type=\"png\" data-w=\"241\" \/><\/noscript><\/p>\n<h2 style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 22px; word-break: break-all;\">\u9650\u5236\u76f8\u540c\u57df\u540d\uff0c\u6bcf\u79d2\u53ea\u5141\u8bb8\u4e00\u4e2a\u8bf7\u6c42<\/h2>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">http {\n\tlimit_req_zone $server_name zone=testip:10m rate=1r\/s;\n\tserver {\n\t\tlocation \/ {\n<span style=\"box-sizing: border-box; cursor: var(--cursor-default); color: #bbb529; word-break: break-all;\">\t\t\t# <\/span><span style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\u53ef\u4ee5\u653e\u5728 http,server,location<\/span>\n\t\t\tlimit_req zone=testip;\n\t\t}\n\t}\n}\n<\/code><\/pre>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u6548\u679c\u4e0e\u4e0a\u9762\u4e00\u81f4<\/p>\n<p><br style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\" \/>\u9650\u5236\u8fde\u63a5\u6570<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">http1.1\u53ef\u4ee5\u8fde\u63a5\u590d\u7528\uff0c\u6240\u4ee5\u4e00\u4e2a\u8fde\u63a5\u53ef\u4ee5\u5bf9\u5e94\u591a\u4e2a\u8bf7\u6c42<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u4e0e\u4e0a\u65b9\u9650\u5236\u8bf7\u6c42\u7c7b\u4f3c\uff0c\u9996\u5148\u9700\u8981\u5b9a\u4e49\u9650\u5236\u8fde\u63a5\u533a\u95f4<\/p>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">limit_conn_zone $binary_remote_addr zone=testip:10m;\n<\/code><\/pre>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u7136\u540e\u76f4\u63a5\u4f7f\u7528\u5373\u53ef<\/p>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">limit_conn testip 5;\n<\/code><\/pre>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u4e0a\u9762\u914d\u7f6e\u4ee3\u8868\u5355\u4e2aip\u7684\u6700\u5927\u8fde\u63a5\u6570\u4e3a5<\/p>\n<p><br style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\" \/>\u5e26\u5bbd\u9650\u5236<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u4f7f\u7528 limit_rate \u53ef\u4ee5\u9650\u5236\u4e0b\u8f7d\u7684\u901f\u5ea6<\/p>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">server {\n\tlisten       <span style=\"box-sizing: border-box; cursor: var(--cursor-default); color: #6897bb; word-break: break-all;\">80<\/span>;\n\tserver_name  sdpro.<span style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">top<\/span>;\n\t\n\t<span style=\"box-sizing: border-box; cursor: var(--cursor-default); color: grey; word-break: break-all;\">\/\/ \u4f8b\u5982\u9650\u5236\u4e0b\u8f7d\u901f\u5ea6\u4e3a500k<\/span>\n\tlimit_rate\t500k;\n\t\n\tlocation \/ {\n\t\troot   html;\n\t\tindex  index.<span style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">html<\/span>;\n\t}\n}<\/code><\/pre>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u8d85\u8fc7\u6307\u5b9a\u5927\u5c0f\u540e\u9650\u5236<\/p>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">server {\n\t<span style=\"box-sizing: border-box; cursor: var(--cursor-default); color: grey; word-break: break-all;\">\/\/ \u4e0b\u8f7d\u901f\u5ea6\u8d85\u8fc7500k\u5219\u9650\u5236\u4e3a10k<\/span>\n\tlimit_rate        10k;\n\tlimit_rate_after  500k;\n}<\/code><\/pre>\n<h1 style=\"box-sizing: border-box; cursor: var(--cursor-default); font-size: 24px; margin-top: 20px; margin-bottom: 10px; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; word-break: break-all;\">\u6700\u5927\u4e0a\u4f20\u5927\u5c0f<\/h1>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u9650\u5236\u6700\u5927\u4e0a\u4f20\u5927\u5c0f\u53ef\u4ee5\u907f\u514d\u522b\u4eba\u6076\u610f\u4e0a\u4f20\u5f88\u5927\u7684\u6587\u4ef6\u800c\u5360\u7528\u8d44\u6e90<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u5728http\u52a0\u5165\u5982\u4e0b\u914d\u7f6e\u6765\u9650\u5236<\/p>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">client_max_body_size 100m;\n<\/code><\/pre>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">m\u4ee3\u8868MB(\u5146\u5b57\u8282)<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u4ee5\u4e0a\u9650\u5236\u90fd\u53ef\u4ee5\u6839\u636e\u60c5\u51b5\u914d\u5408\u4f7f\u7528<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u4f8b\u5982\u6211\u7684\u914d\u7f6e<\/p>\n<pre style=\"box-sizing: border-box; cursor: var(--cursor-default); overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; background-color: #f5f5f5; border-radius: 4px; border: 1px solid #cccccc;\"><code style=\"box-sizing: border-box; cursor: var(--cursor-default); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; padding: 1em; color: #a9b7c6; background: #282b2e; border-radius: 0px; white-space: pre-wrap; word-break: break-all; display: block; overflow-x: auto;\">http{\n<span style=\"box-sizing: border-box; cursor: var(--cursor-default); color: #bbb529; word-break: break-all;\">\t# <\/span><span style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\u6700\u5927\u4e0a\u4f20 30m<\/span>\n\tclient_max_body_size 30m;\n<span style=\"box-sizing: border-box; cursor: var(--cursor-default); color: #bbb529; word-break: break-all;\">\t# <\/span><span style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\u9650\u5236\u540c\u4e00ip\u8fde\u63a5\u6570\u91cf<\/span>\n\tlimit_conn_zone $binary_remote_addr zone=connLimit:10m;\n\tlimit_conn connLimit 5;\n<span style=\"box-sizing: border-box; cursor: var(--cursor-default); color: #bbb529; word-break: break-all;\">\n\t# <\/span><span style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\u9650\u5236\u540c\u4e00ip\u6bcf\u79d2\u6700\u5927\u8bf7\u6c42\u6570<\/span>\n\tlimit_req_zone $binary_remote_addr zone=reqLimit:10m rate=50r\/s;\n\tlimit_req zone=reqLimit burst=20 nodelay;\n<span style=\"box-sizing: border-box; cursor: var(--cursor-default); color: #bbb529; word-break: break-all;\">\n\t# <\/span><span style=\"box-sizing: border-box; cursor: var(--cursor-default); word-break: break-all;\">\u9650\u5236\u4e0b\u8f7d\u901f\u5ea6, \u8d85\u8fc7512k\u5219\u9650\u5236\u4e3a64k<\/span>\n\tlimit_rate          64k;\n\tlimit_rate_after    512k;\n}\n<\/code><\/pre>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">\u56e0\u4e3a\u6211\u7684\u7f51\u9875\u4e00\u4e2ahtml\u5c31\u6709\u4e09\u5341\u591a\u8bf7\u6c42\uff0c\u6240\u4ee5\u9650\u523650\/s\uff0c\u6269\u5c5520\uff0c\u9650\u5236\u4e86\u4e0b\u8f7d\u901f\u5ea6\uff0c\u6240\u4ee5\u8fde\u63a5\u6570\u91cf\u53ef\u4ee5\u5f04\u591a\u4e00\u70b9<\/p>\n<p style=\"box-sizing: border-box; cursor: var(--cursor-default); margin-bottom: 10px; word-break: break-all; overflow-x: auto;\">END<\/p>\n<p style=\"display: none;\">\n<blockquote><p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7: \u7837\u78b2\u7684\u5b66\u8bc6\u4ed3\u5e93<\/p><\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4e86\u9632\u6b62\u7f51\u7ad9\u88ab\u6076\u610f\u653b\u51fb\uff0c\u603b\u662f\u9700\u8981\u505a\u4e00\u4e9b\u9632\u62a4\u63aa\u65bd \u6700\u5916\u5c42\u7684web\u670d\u52a1\u5668\u662fNginx\uff0c\u4e8e\u662f\u5bfb\u627e nginx \u7684\u4e00\u4e9b\u5173\u4e8e\u9632\u62a4\u63aa\u65bd\u7684\u914d\u7f6e\uff0c &#8230;<\/p>\n","protected":false},"author":1,"featured_media":318,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-320","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nginx"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004156195-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004158757.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004156195.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004156195.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004158757.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004156195.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004156195.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004156195.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004158757.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004158757.png","id":"image1"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Nginx","post_date":"2023-02-27","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":220,"next_post_id":204,"next_post_title":"Nginx\u5165\u95e8\u5230\u7cbe\u901a","previous_post_id":null,"previous_post_title":null,"_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=320"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/320\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/318"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}