{"id":18,"date":"2018-06-05T13:51:14","date_gmt":"2018-06-05T05:51:14","guid":{"rendered":"http:\/\/hootye.com\/?p=18"},"modified":"2018-06-05T13:51:14","modified_gmt":"2018-06-05T05:51:14","slug":"photogallery-x3-%e7%9a%84-nginx-%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/hootye.com\/?p=18","title":{"rendered":"photogallery X3 \u7684 nginx \u914d\u7f6e\u6587\u4ef6"},"content":{"rendered":"<p>\u914d\u7f6e\u6587\u4ef6\uff1anginx<\/p>\n<p><!--more--><\/p>\n<p># Imagevue<br \/>\n# Rewrite any calls to *.html, *.json, *.xml, *.atom, *.rss, *.rdf or *.txt if a folder matching * exists<br \/>\nif (!-f $request_filename) {<br \/>\nset $rule_0 1$rule_0;<br \/>\n}<br \/>\nif ($uri !~ &#8220;public\/&#8221;) {<br \/>\nset $rule_0 2$rule_0;<br \/>\n}<br \/>\nif (!-f $document_root\/public\/$1.$2) {<br \/>\nset $rule_0 3$rule_0;<br \/>\n}<br \/>\nif ($rule_0 = &#8220;321&#8221;) {<br \/>\nrewrite \/(.+).(html|json|xml|atom|rss|rdf|txt)$ \/$1\/ last;<br \/>\n}<\/p>\n<p># Rewrite any calls to \/render to the image parser<br \/>\nif ($uri ~ &#8220;render\/&#8221;) {<br \/>\nrewrite ^\/render\/. \/app\/parsers\/slir\/ last;<br \/>\n}<\/p>\n<p># Rewrite any calls to \/* or \/app to the index.php file<br \/>\nif ($uri ~ &#8220;\/app\/$&#8221;) {<br \/>\nrewrite ^\/app\/ \/index.php last;<br \/>\n}<\/p>\n<p># Rewrite any calls to \/* or \/app to the index.php file<br \/>\nif (!-f $request_filename) {<br \/>\nset $rule_3 1$rule_3;<br \/>\n}<br \/>\nif (!-d $request_filename) {<br \/>\nset $rule_3 2$rule_3;<br \/>\n}<br \/>\nif ($rule_3 = &#8220;21&#8221;){<br \/>\nrewrite ^\/(.*)\/$ \/index.php?\/$1\/ last;<br \/>\n}<\/p>\n<p># Rewrite any file calls to the public directory<br \/>\nif (!-f $request_filename) {<br \/>\nset $rule_4 1$rule_4;<br \/>\n}<br \/>\nif (!-d $request_filename) {<br \/>\nset $rule_4 2$rule_4;<br \/>\n}<br \/>\nif ($uri !~ &#8220;public\/&#8221;) {<br \/>\nset $rule_4 3$rule_4;<br \/>\n}<br \/>\nif ($rule_4 = &#8220;321&#8221;){<br \/>\nrewrite ^\/(.+)$ \/public\/$1 last;<br \/>\n}<\/p>\n<p># Prevent access to .txt &amp; .yml files<br \/>\nlocation ~ &#8220;.(txt|yml)$&#8221; {<br \/>\ndeny all;<br \/>\n}<\/p>\n<p># Increase cookie security<br \/>\n# Add fastcgi_param PHP_VALUE &#8220;session.cookie_httponly true&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u914d\u7f6e\u6587\u4ef6\uff1anginx<\/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":[],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/hootye.com\/index.php?rest_route=\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hootye.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hootye.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hootye.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hootye.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18"}],"version-history":[{"count":1,"href":"https:\/\/hootye.com\/index.php?rest_route=\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/hootye.com\/index.php?rest_route=\/wp\/v2\/posts\/18\/revisions\/19"}],"wp:attachment":[{"href":"https:\/\/hootye.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hootye.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hootye.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}