{"id":102510,"date":"2020-05-03T14:51:39","date_gmt":"2020-05-03T06:51:39","guid":{"rendered":"http:\/\/4563.org\/?p=102510"},"modified":"2020-05-03T14:51:39","modified_gmt":"2020-05-03T06:51:39","slug":"nginx-%e7%9a%84%e9%85%8d%e7%bd%ae%e4%bb%a3%e7%a0%81%e4%b8%8d%e6%98%af%e6%8c%89%e9%a1%ba%e5%ba%8f%e6%89%a7%e8%a1%8c%e7%9a%84%e5%90%97","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=102510","title":{"rendered":"nginx \u7684\u914d\u7f6e\u4ee3\u7801\u4e0d\u662f\u6309\u987a\u5e8f\u6267\u884c\u7684\u5417"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  nginx \u7684\u914d\u7f6e\u4ee3\u7801\u4e0d\u662f\u6309\u987a\u5e8f\u6267\u884c\u7684\u5417               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jugelizi <\/span>  <span><i><\/i> 58<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5982\u679c\u6587\u4ef6\u4e0d\u5b58\u5728<br \/> \u5148\u5224\u65ad\u662f\u5426\u5236\u5b9a\u7c7b\u578b \u6267\u884c\u8df3\u8f6c if(uri ) \u5176\u4ed6\u4e0d\u5b58\u5728\u7684 \u6267\u884c\u5176\u4ed6\u4e8b\u52a1<\/p>\n<p>\u597d\u50cf\u8fd9\u6837\u4e0d\u884c<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>12<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"681813\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : alexliux <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u89c4\u5219\u957f\u7684\u4f18\u5148                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681814\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiri <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u662f\uff0c\u6709\u4e13\u95e8\u7684\u4f18\u5148\u7ea7\u7684\uff0c\u597d\u8c61\u662f\u6b63\u5219\u65b9\u5f0f\u5339\u914d\u7684\u4f18\u5148\u7ea7\u6700\u9ad8\uff0c\/\u7684\u4f18\u5148\u7ea7\u6700\u4f4e\uff08\u4e0d\u4fdd\u8bc1\u6b63\u786e\u6027\uff09\uff0c\u4e2d\u95f4\u8fd8\u6709\u597d\u591a\u7c7b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681815\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u641c\u7d22\u4e0b why nginx if is evil                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681816\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xmlf <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u9047\u5230 deny IP \u6bb5\u7adf\u7136\u4e0d\u8d77\u4f5c\u7528\u7684\u60c5\u51b5\u3002\u5b9e\u9a8c\u81ea\u5df1\u7684 ip \u6bb5\u6ca1\u95ee\u9898\u3002\u6211\u4e5f\u90c1\u95f7\u6b7b\u4e86\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681817\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hcymk2 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             agentzh \u7684 Nginx \u6559\u7a0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681818\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xmlf <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hcymk2 \u611f\u8c22\u3002<br \/>\u4e4b\u6240\u4ee5\u4e0d\u8d77\u4f5c\u7528\u662f\u56e0\u4e3a rewrite \u6307\u4ee4\u5728 access \u6307\u4ee4\u4e4b\u524d\u6267\u884c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681819\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : adoal <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             nginx \u914d\u7f6e\u8bed\u6cd5\u662f\u63cf\u8ff0\u5f0f\u7684\uff0c\u4e0d\u662f\u8fc7\u7a0b\u5f0f\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681820\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kidlj <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             if \u5c5e\u4e8e rewrite module\uff0crewrite module \u4f18\u5148\u7ea7\u9ad8\u3002\u770b\u5b98\u65b9\u6587\u6863\uff0c\u82f1\u6587\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681821\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : bobuick <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ngx \u7684 parser \u662f\u5206\u51e0\u4e2a\u9636\u6bb5\u7684\uff0c\u4e0d\u540c\u7684 direct \u5199\u5728\u4e0d\u540c\u4f4d\u7f6e\u5904\u5728\u7684 parser \u9636\u6bb5\u4e0d\u4e00\u6837\uff0c\u5e76\u4e0d\u662f\u5b8c\u5168\u6309\u4e66\u5199\u987a\u5e8f\u6765\u5b9a\u7684\uff0c\u800c\u662f\u770b parser \u9636\u6bb5\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681822\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Citrus <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u65b0\u624b\u5927\u6982\u7387\u4f1a\u72af\u7684\u9519\u8bef\uff1a\u8ba4\u4e3a Nginx \u914d\u7f6e\u6587\u4ef6\u662f\u5e76\u884c\u7684\u3002<br \/>\u5efa\u8bae\u53bb\u770b\u6625\u54e5\u7684 Nginx \u6559\u7a0b\uff0cNginx \u5904\u7406\u8bf7\u6c42\u662f\u6709\u751f\u547d\u5468\u671f\u7684\u3002\u5b9e\u9645\u4e0a\u6bcf\u4e00\u4e2a\u4e0d\u540c\u7684\u914d\u7f6e\u662f\u5728\u4e0d\u540c\u7684\u751f\u547d\u5468\u671f\u91cc\u6267\u884c\u7684\u3002\u9760\u524d\u7684\u751f\u547d\u5468\u671f\u4e2d\u7684\u914d\u7f6e\u9879\u5c31\u7b97\u662f\u5199\u5230\u6700\u672b\u5c3e\uff0c\u4e5f\u662f\u4f18\u5148\u6267\u884c\u7684\u3002<br \/>\u6bd4\u5982\uff1a<br \/>&#8220;`<br \/>location \/test {<br \/> set $a 1;<br \/> echo $a;<\/p>\n<p> set $a 2; <br \/> echo $a;<br \/>}<br \/>&#8220;`<br \/>\u5b9e\u9645\u8f93\u51fa\u7684\u662f\u4e24\u4e2a 2\uff0c\u800c\u4e0d\u662f\u4e00\u4e2a 1 \u4e00\u4e2a 2\u3002\u56e0\u4e3a set \u662f rewrite \u9636\u6bb5\u6267\u884c\uff0cecho \u662f content \u9636\u6bb5\u6267\u884c\uff0c\u56e0\u6b64\u5c31\u7b97\u4f60\u662f\u4ea4\u53c9\u5199\u7684\uff0c\u7b2c\u4e00\u4e2a echo \u4e5f\u4e0d\u4f1a\u4f1a\u6bd4\u7b2c\u4e8c\u4e2a set \u5148\u6267\u884c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681823\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : loading <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e00\u822c\u8def\u7531\u5730\u5740\u4e5f\u662f\u6df1\u5ea6\u4f18\u5148\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"681824\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : msg7086 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u662f\u987a\u5e8f\u6267\u884c\u7684\u3002\u5012\u4e0d\u5982\u8bf4\u8fd9\u662f\u914d\u7f6e\u800c\u4e0d\u662f\u4ee3\u7801\uff0c\u6240\u4ee5\u6839\u672c\u4e0d\u80fd \u6267\u884c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>nginx \u7684\u914d\u7f6e\u4ee3\u7801\u4e0d\u662f\u6309\u987a\u5e8f\u6267&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\/102510"}],"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=102510"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/102510\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=102510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=102510"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=102510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}