{"id":135,"date":"2024-11-22T19:28:35","date_gmt":"2024-11-22T11:28:35","guid":{"rendered":"https:\/\/0x0.pub\/?p=135"},"modified":"2025-01-17T22:45:04","modified_gmt":"2025-01-17T14:45:04","slug":"nginx-%e9%85%8d%e7%bd%ae%e7%a6%81%e6%ad%a2ip%e6%96%b9%e5%bc%8f%e8%ae%bf%e9%97%ae%e7%bd%91%e7%ab%99","status":"publish","type":"post","link":"https:\/\/0x0.pub\/?p=135","title":{"rendered":"Nginx \u914d\u7f6e\u7981\u6b62IP\u65b9\u5f0f\u8bbf\u95ee\u7f51\u7ad9"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p class=\"has-small-font-size\">Nginx\u7981\u7528IP\u65b9\u5f0f\u901a\u8fc7443\/80\u7aef\u53e3\u8bbf\u95ee\u7f51\u7ad9\uff0c\u4e5f\u53ef\u4ee5\u5c4f\u853d\u5176\u5b83\u7684\u57df\u540d\u89e3\u6790\u5230\u4f60\u7684\u7f51\u7ad9IP\u3002<\/p>\n\n\n\n<p class=\"has-small-font-size\">\u52a0\u4e00\u4e2aserver\u5757\uff0cserver_name _;<\/p>\n\n\n\n<p class=\"has-small-font-size\"> return 403; \u6216\u8005301\u5f15\u6d41\u5230\u6307\u5b9aURL<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>server {\n        listen 80 default;\n        listen 443 default_server;\n        server_name _;\n        ssl_certificate \/usr\/local\/nginx\/conf\/ssl\/www.example.com.cer;\n        ssl_certificate_key \/usr\/local\/nginx\/conf\/ssl\/www.example.com.key;\n        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;\n        ssl_ciphers TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;\n        ssl_prefer_server_ciphers on;\n        ssl_session_timeout 10m;\n        ssl_session_cache builtin:1000 shared:SSL:10m;\n        return 403;\n       }<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx\u7981\u7528IP\u65b9\u5f0f\u901a\u8fc7443\/80\u7aef\u53e3\u8bbf\u95ee\u7f51\u7ad9\uff0c\u4e5f\u53ef\u4ee5\u5c4f\u853d\u5176\u5b83\u7684\u57df\u540d\u89e3\u6790\u5230\u4f60\u7684\u7f51\u7ad9IP\u3002 \u52a0\u4e00\u4e2aserve [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[16,24],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-note","tag-nginx","tag-ip"],"_links":{"self":[{"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/0x0.pub\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=135"}],"version-history":[{"count":2,"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/posts\/135\/revisions\/172"}],"wp:attachment":[{"href":"https:\/\/0x0.pub\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0x0.pub\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0x0.pub\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}