{"id":24692,"date":"2020-02-13T19:53:12","date_gmt":"2020-02-13T11:53:12","guid":{"rendered":"http:\/\/4563.org\/?p=24692"},"modified":"2020-02-13T19:53:12","modified_gmt":"2020-02-13T11:53:12","slug":"%e3%80%90%e6%95%99%e7%a8%8b%e3%80%91nginx%e5%8f%8d%e4%bb%a3-%e7%bc%93%e5%ad%98%e6%9b%b4%e6%96%b0","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=24692","title":{"rendered":"\u3010\u6559\u7a0b\u3011Nginx\u53cd\u4ee3  \u7f13\u5b58\u66f4\u65b0"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>laoxong<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u3010\u6559\u7a0b\u3011Nginx\u53cd\u4ee3  \u7f13\u5b58\u66f4\u65b0<\/h3>\n<p>  \t\t\u4e4b\u524dMJJ\u7684https:\/\/www.hostloc.com\/thread-643832-1-1.html\u5e16\u5b50\u6709\u4ecb\u7ecd\uff0c\u4f46\u662f\u7f8e\u4e2d\u4e0d\u8db3\u7684\u662f\u6ca1\u6709\u7f13\u5b58\u7684\u66f4\u65b0<br \/>  \u5728\u697c\u4e3b\u63d0\u9192\u6211\u4e4b\u524d\u5199\u7684\u4e0d\u5bf9\u65f6\u53c8\u91cd\u65b0\u7814\u7a76\u4e86\u4e0b\uff0c\u7814\u7a76\u51fa\u4e86\u6b63\u786e\u65b9\u6cd5<br \/>  \u914d\u7f6e\u6587\u4ef6\uff1a\u81ea\u5df1\u6539\u4e00\u4e0b<br \/>  proxy_cache_path \/usr\/local\/nginx\/caches\/moec.top levels=1:2 keys_zone=laoxong:50m inactive=30m max_size=50m;<br \/>  server {<br \/>   listen 80;<br \/>   listen 443 ssl http2;<br \/>   ssl_certificate \/usr\/local\/nginx\/conf\/ssl\/moec.crt;<br \/>   ssl_certificate_key \/usr\/local\/nginx\/conf\/ssl\/moec.key;<br \/>   ssl_session_timeout 1d;<br \/>   ssl_session_cache builtin:1000 shared:SSL:10m;<br \/>   add_header Strict-Transport-Security &quot;max-age=63072000; includeSubdomains; preload&quot;;<br \/>   ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;<br \/>   ssl_ciphers &quot;TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+ECDSA+AES128:EECDH+aRSA+AES128:RSA+AES128:EECDH+ECDSA+AES256:EECDH+aRSA+AES256:RSA+AES256:EECDH+ECDSA+3DES:EECDH+aRSA+3DES:RSA+3DES:!MD5&quot;;<\/p>\n<p>   ssl_prefer_server_ciphers on;<\/p>\n<p>   ssl_stapling on;<br \/>   ssl_stapling_verify on;<\/p>\n<p>   server_name \u4f60\u7684\u57df\u540d;<br \/>   access_log \/usr\/local\/nginx\/caches\/moec.top_nginx.log combined;<\/p>\n<p>   charset utf-8,gbk;<br \/>   location \/ {<br \/>   proxy_set_header Accept-Encoding &quot;&quot;;<br \/>   proxy_pass https:\/\/\u4f60\u7684\u7f51\u7ad9;<br \/>   proxy_redirect off;<br \/>   proxy_set_header X-Real-IP $remote_addr;<br \/>   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>   proxy_cache laoxong;<br \/>   proxy_cache_key $uri$is_args$args;<br \/>   proxy_cache_valid 200 304 30m;<br \/>   proxy_cache_valid 301 24h;<br \/>   proxy_cache_valid 500 502 503 504 0s;<br \/>   proxy_cache_valid any 1s;<br \/>   proxy_cache_min_uses 1;<br \/>   expires 12h;<br \/>   }<br \/>   location ~ \/purge(\/.*) {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; allow&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;all;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; allow&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;127.0.0.1;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;#&nbsp; &nbsp; deny&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;all;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_cache_purge laoxong $1$is_args$args;<br \/>   }<br \/>  }<\/p>\n<p>  \u5b8c\u6574\u8bf7\u770b https:\/\/www.moec.top\/archives\/403\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>mryin<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5b66\u4e60\u4e86\uff0c\u5199\u7684\u5f88\u8ba4\u771f\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>laoxong \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u3010&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/24692"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24692"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/24692\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24692"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}