{"id":250,"date":"2018-06-05T13:47:37","date_gmt":"2018-06-05T05:47:37","guid":{"rendered":"http:\/\/tcsm.info\/?p=250"},"modified":"2023-08-21T10:50:49","modified_gmt":"2023-08-21T02:50:49","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:\/\/tcsm.info\/?p=250","title":{"rendered":"photogallery X3 \u7684 nginx \u914d\u7f6e\u6587\u4ef6"},"content":{"rendered":"<p>\u914d\u7f6e\u6587\u4ef6\uff1anginx<\/p>\n<p>Imagevue<\/p>\n\n\n<pre class=\"wp-block-code\"><code>Rewrite any calls to *.html, *.json, *.xml, *.atom, *.rss, *.rdf or *.txt if a folder matching * exists\r\n\r\nif (!-f $request_filename) {\r\nset $rule_0 1$rule_0;\r\n}\r\nif ($uri !~ \"public\/\") {\r\nset $rule_0 2$rule_0;\r\n}\r\nif (!-f $document_root\/public\/$1.$2) {\r\nset $rule_0 3$rule_0;\r\n}\r\nif ($rule_0 = \"321\") {\r\nrewrite \/(.+).(html|json|xml|atom|rss|rdf|txt)$ \/$1\/ last;\r\n}\r\n\r\nRewrite any calls to \/render to the image parser\r\n\r\nif ($uri ~ \"render\/\") {\r\nrewrite ^\/render\/. \/app\/parsers\/slir\/ last;\r\n}\r\n\r\nRewrite any calls to \/* or \/app to the index.php file\r\n\r\nif ($uri ~ \"\/app\/$\") {\r\nrewrite ^\/app\/ \/index.php last;\r\n}\r\n\r\nRewrite any calls to \/* or \/app to the index.php file\r\n\r\nif (!-f $request_filename) {\r\nset $rule_3 1$rule_3;\r\n}\r\nif (!-d $request_filename) {\r\nset $rule_3 2$rule_3;\r\n}\r\nif ($rule_3 = \"21\"){\r\nrewrite ^\/(.*)\/$ \/index.php?\/$1\/ last;\r\n}\r\n\r\nRewrite any file calls to the public directory\r\n\r\nif (!-f $request_filename) {\r\nset $rule_4 1$rule_4;\r\n}\r\nif (!-d $request_filename) {\r\nset $rule_4 2$rule_4;\r\n}\r\nif ($uri !~ \"public\/\") {\r\nset $rule_4 3$rule_4;\r\n}\r\nif ($rule_4 = \"321\"){\r\nrewrite ^\/(.+)$ \/public\/$1 last;\r\n}\r\n\r\nPrevent access to .txt &amp; .yml files\r\n\r\nlocation ~ \".(txt|yml)$\" {\r\ndeny all;\r\n}\r\n\r\nIncrease cookie security\r\n\r\nAdd fastcgi_param PHP_VALUE \"session.cookie_httponly true\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u914d\u7f6e\u6587\u4ef6\uff1anginx Imagevue<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[8],"tags":[],"class_list":["post-250","post","type-post","status-publish","format-standard","hentry","category-8"],"views":1,"_links":{"self":[{"href":"https:\/\/tcsm.info\/index.php?rest_route=\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tcsm.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tcsm.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tcsm.info\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tcsm.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=250"}],"version-history":[{"count":0,"href":"https:\/\/tcsm.info\/index.php?rest_route=\/wp\/v2\/posts\/250\/revisions"}],"wp:attachment":[{"href":"https:\/\/tcsm.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tcsm.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tcsm.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}