{"id":53904,"date":"2025-08-12T18:39:37","date_gmt":"2025-08-12T10:39:37","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/53904.html"},"modified":"2025-08-12T18:39:37","modified_gmt":"2025-08-12T10:39:37","slug":"nginx-%e6%a8%a1%e5%9d%97%e5%8f%8a%e5%8f%82%e6%95%b0%e7%9a%84%e8%af%a6%e7%bb%86%e8%a7%a3%e9%87%8a","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/53904.html","title":{"rendered":"Nginx \u6a21\u5757\u53ca\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca"},"content":{"rendered":"<table align=\"left\" border=\"2\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u6a21\u5757\u540d\u79f0<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u8bf4\u660e<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u793a\u4f8b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_core_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">Nginx \u6838\u5fc3\u6a21\u5757\uff0c\u63d0\u4f9b\u57fa\u672c\u7684 HTTP \u529f\u80fd\u548c\u914d\u7f6e\u652f\u6301\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">worker_processes 4;&nbsp;\u7528\u4e8e\u914d\u7f6e Nginx \u4f7f\u7528\u7684\u5de5\u4f5c\u8fdb\u7a0b\u6570\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_access_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u7684\u6a21\u5757\uff0c\u901a\u8fc7 IP \u5730\u5740\u6216\u5176\u4ed6\u6761\u4ef6\u6765\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">deny 192.168.1.1;&nbsp;\u963b\u6b62\u6307\u5b9a IP \u5730\u5740\u7684\u8bbf\u95ee\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_addition_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u5141\u8bb8\u5728\u54cd\u5e94\u4e2d\u9644\u52a0\u5185\u5bb9\uff0c\u7528\u4e8e\u52a8\u6001\u5730\u4fee\u6539 HTTP \u54cd\u5e94\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">add_header X-Frame-Options SAMEORIGIN;&nbsp;\u5728\u54cd\u5e94\u4e2d\u6dfb\u52a0&nbsp;X-Frame-Options&nbsp;\u5934\u90e8\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_api_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u63d0\u4f9b API \u529f\u80fd\u7684\u6a21\u5757\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">location \/api { api; }&nbsp;\u914d\u7f6e API \u8def\u7531\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_auth_basic_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u652f\u6301\u57fa\u672c\u8ba4\u8bc1\u7684\u6a21\u5757\uff0c\u901a\u8fc7\u7528\u6237\u540d\u548c\u5bc6\u7801\u4fdd\u62a4\u8d44\u6e90\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">auth_basic \\&#8221;Restricted\\&#8221;;&nbsp;\u542f\u7528\u57fa\u672c\u8ba4\u8bc1\uff0c\u8981\u6c42\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_auth_jwt_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u652f\u6301\u901a\u8fc7 JWT (JSON Web Token) \u5b9e\u73b0\u8ba4\u8bc1\u7684\u6a21\u5757\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">auth_jwt \\&#8221;secret\\&#8221;;&nbsp;\u4f7f\u7528 JWT \u8fdb\u884c\u8ba4\u8bc1\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_auth_request_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u652f\u6301\u901a\u8fc7\u5916\u90e8\u8bf7\u6c42\u8fdb\u884c\u8ba4\u8bc1\u7684\u6a21\u5757\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">auth_request \/auth;&nbsp;\u5c06\u8ba4\u8bc1\u8bf7\u6c42\u8f6c\u53d1\u7ed9&nbsp;\/auth&nbsp;\u8def\u5f84\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_autoindex_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u751f\u6210\u76ee\u5f55\u5217\u8868\u7684\u6a21\u5757\uff0c\u5f53\u76ee\u5f55\u6ca1\u6709&nbsp;index.html&nbsp;\u7b49\u6587\u4ef6\u65f6\uff0c\u4f1a\u5217\u51fa\u76ee\u5f55\u5185\u5bb9\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">autoindex on;&nbsp;\u6253\u5f00\u76ee\u5f55\u81ea\u52a8\u7d22\u5f15\u529f\u80fd\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_browser_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u6839\u636e\u6d4f\u89c8\u5668\u7684 User-Agent \u63d0\u4f9b\u4e0d\u540c\u7684\u54cd\u5e94\u5185\u5bb9\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">if ($http_user_agent ~ \\&#8221;MSIE\\&#8221;) { add_header X-Content-Type-Options nosniff; }<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_charset_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u8bbe\u7f6e\u54cd\u5e94\u5b57\u7b26\u96c6\u7684\u6a21\u5757\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">charset UTF-8;&nbsp;\u8bbe\u7f6e\u54cd\u5e94\u5b57\u7b26\u96c6\u4e3a UTF-8\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_dav_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u7528\u4e8e\u652f\u6301 WebDAV \u534f\u8bae\u7684\u6a21\u5757\uff0c\u5141\u8bb8\u4e0a\u4f20\u3001\u4e0b\u8f7d\u548c\u7ba1\u7406\u6587\u4ef6\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">dav_methods PUT DELETE MKCOL COPY MOVE;&nbsp;\u914d\u7f6e WebDAV \u652f\u6301\u7684 HTTP \u65b9\u6cd5\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_empty_gif_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u8fd4\u56de\u4e00\u4e2a 1&#215;1 \u50cf\u7d20\u7684\u7a7a\u767d GIF \u56fe\u50cf\u7684\u6a21\u5757\uff0c\u5e38\u7528\u4e8e\u5360\u4f4d\u6216\u9632\u6b62\u722c\u866b\u8bbf\u95ee\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">location \/empty.gif { empty_gif; }&nbsp;\u8fd4\u56de\u4e00\u4e2a\u7a7a\u767d GIF \u56fe\u50cf\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_f4f_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u652f\u6301 F4F (FastCGI to FastCGI) \u529f\u80fd\u7684\u6a21\u5757\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">fastcgi_pass unix:\/tmp\/php-fpm.sock;&nbsp;\u914d\u7f6e FastCGI \u540e\u7aef\u670d\u52a1\u5668\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_fastcgi_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u652f\u6301 FastCGI \u534f\u8bae\u7684\u6a21\u5757\uff0c\u7528\u4e8e\u8fde\u63a5 PHP\u3001Perl \u7b49\u52a8\u6001\u8bed\u8a00\u7684\u5e94\u7528\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">fastcgi_pass 127.0.0.1:9000;&nbsp;\u914d\u7f6e FastCGI \u670d\u52a1\u5668\u5730\u5740\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_flv_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u63d0\u4f9b\u5bf9 FLV \u89c6\u9891\u683c\u5f0f\u7684\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93 FLV \u89c6\u9891\u6587\u4ef6\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">location \/video\/ { flv; }&nbsp;\u542f\u7528 FLV \u6587\u4ef6\u7684\u652f\u6301\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"height:56.7pt;width:164px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">ngx_http_geo_module<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:281px\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:center\">\u6839\u636e\u5ba2\u6237\u7aef IP \u5730\u5740\u6765\u8bbe\u7f6e\u53d8\u91cf\uff0c\u4f8b\u5982\u5b9e\u73b0\u5730\u7406\u4f4d\u7f6e\u7684\u9650\u5236\u3002<\/p>\n<\/td>\n<td style=\"height:56.7pt;width:202px\"> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb447\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u6a21\u5757\u540d\u79f0\u8bf4\u660e\u793a\u4f8bngx_http_core_moduleNginx \u6838\u5fc3\u6a21\u5757\uff0c\u63d0\u4f9b\u57fa\u672c\u7684 HTTP \u529f\u80fd\u548c\u914d\u7f6e\u652f\u6301\u3002worker_processes 4; \u7528\u4e8e\u914d\u7f6e Nginx \u4f7f\u7528\u7684\u5de5\u4f5c\u8fdb\u7a0b\u6570\u3002ngx_http_access_module\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u7684\u6a21\u5757\uff0c\u901a\u8fc7 IP \u5730\u5740\u6216\u5176\u4ed6\u6761\u4ef6\u6765\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u3002deny 192.168.1.1; \u963b\u6b62\u6307\u5b9a IP \u5730\u5740\u7684\u8bbf\u95ee\u3002ngx_http_addition_module\u5141\u8bb8\u5728\u54cd\u5e94\u4e2d\u9644\u52a0\u5185\u5bb9\uff0c\u7528\u4e8e\u52a8\u6001\u5730\u4fee\u6539 HTTP \u54cd\u5e94\u3002add_header X-Frame-Opt<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[117,5388,44],"topic":[],"class_list":["post-53904","post","type-post","status-publish","format-standard","hentry","category-server","tag-nginx","tag-xcode","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Nginx \u6a21\u5757\u53ca\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca - \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\/53904.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Nginx \u6a21\u5757\u53ca\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb447\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u6a21\u5757\u540d\u79f0\u8bf4\u660e\u793a\u4f8bngx_http_core_moduleNginx \u6838\u5fc3\u6a21\u5757\uff0c\u63d0\u4f9b\u57fa\u672c\u7684 HTTP \u529f\u80fd\u548c\u914d\u7f6e\u652f\u6301\u3002worker_processes 4; \u7528\u4e8e\u914d\u7f6e Nginx \u4f7f\u7528\u7684\u5de5\u4f5c\u8fdb\u7a0b\u6570\u3002ngx_http_access_module\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u7684\u6a21\u5757\uff0c\u901a\u8fc7 IP \u5730\u5740\u6216\u5176\u4ed6\u6761\u4ef6\u6765\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u3002deny 192.168.1.1; \u963b\u6b62\u6307\u5b9a IP \u5730\u5740\u7684\u8bbf\u95ee\u3002ngx_http_addition_module\u5141\u8bb8\u5728\u54cd\u5e94\u4e2d\u9644\u52a0\u5185\u5bb9\uff0c\u7528\u4e8e\u52a8\u6001\u5730\u4fee\u6539 HTTP \u54cd\u5e94\u3002add_header X-Frame-Opt\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/53904.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-12T10:39:37+00:00\" \/>\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=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53904.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/53904.html\",\"name\":\"Nginx \u6a21\u5757\u53ca\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-12T10:39:37+00:00\",\"dateModified\":\"2025-08-12T10:39:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/53904.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/53904.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53904.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Nginx \u6a21\u5757\u53ca\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca\"}]},{\"@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":"Nginx \u6a21\u5757\u53ca\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca - \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\/53904.html","og_locale":"zh_CN","og_type":"article","og_title":"Nginx \u6a21\u5757\u53ca\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb447\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u6a21\u5757\u540d\u79f0\u8bf4\u660e\u793a\u4f8bngx_http_core_moduleNginx \u6838\u5fc3\u6a21\u5757\uff0c\u63d0\u4f9b\u57fa\u672c\u7684 HTTP \u529f\u80fd\u548c\u914d\u7f6e\u652f\u6301\u3002worker_processes 4; \u7528\u4e8e\u914d\u7f6e Nginx \u4f7f\u7528\u7684\u5de5\u4f5c\u8fdb\u7a0b\u6570\u3002ngx_http_access_module\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u7684\u6a21\u5757\uff0c\u901a\u8fc7 IP \u5730\u5740\u6216\u5176\u4ed6\u6761\u4ef6\u6765\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u3002deny 192.168.1.1; \u963b\u6b62\u6307\u5b9a IP \u5730\u5740\u7684\u8bbf\u95ee\u3002ngx_http_addition_module\u5141\u8bb8\u5728\u54cd\u5e94\u4e2d\u9644\u52a0\u5185\u5bb9\uff0c\u7528\u4e8e\u52a8\u6001\u5730\u4fee\u6539 HTTP \u54cd\u5e94\u3002add_header X-Frame-Opt","og_url":"https:\/\/www.wsisp.com\/helps\/53904.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-12T10:39:37+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/53904.html","url":"https:\/\/www.wsisp.com\/helps\/53904.html","name":"Nginx \u6a21\u5757\u53ca\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-12T10:39:37+00:00","dateModified":"2025-08-12T10:39:37+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/53904.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/53904.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/53904.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Nginx \u6a21\u5757\u53ca\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca"}]},{"@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\/53904","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=53904"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/53904\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=53904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=53904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=53904"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=53904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}