{"id":1408,"date":"2014-04-10T13:13:28","date_gmt":"2014-04-10T04:13:28","guid":{"rendered":"http:\/\/www.white-room.jp\/blog\/?p=1408"},"modified":"2014-04-10T14:35:14","modified_gmt":"2014-04-10T05:35:14","slug":"%e3%82%93%e3%81%8e%e3%81%aa%e3%82%93%e3%81%a8%e3%81%8b%e3%81%a7reverse-proxy-2","status":"publish","type":"post","link":"https:\/\/www.white-room.jp\/blog\/?p=1408","title":{"rendered":"\u3093\u304e\u306a\u3093\u3068\u304b\u3067reverse proxy 2"},"content":{"rendered":"<p>\u8a18\u4e8b\u4f5c\u6210\u6642\u306b\u30d7\u30ec\u30d3\u30e5\u30fc\u304c\u52b9\u304b\u306a\u3044\u306e\u306f\u3001<a href=\"http:\/\/wordpress.org\/plugins\/nginx-proxy-cache-integrator\/\" target=\"_blank\" title=\"\">WordPress Nginx proxy cache integrator<\/a>\u306b\u308f\u304b\u308a\u3084\u3059\u3044\u8a2d\u5b9a\u4f8b\u304c\u3042\u3063\u3066\u3001\u305d\u308c\u3092\u3001<a href=\"http:\/\/wiki.nginx.org\/DirectiveIndex\" target=\"_blank\" title=\"\">nginx\u516c\u5f0f\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u3092\u898b\u306a\u304c\u3089\u66f8\u304d\u76f4\u3057\u305f\u3089\u3001\u304a\u304a\u3080\u306d\u4e88\u5b9a\u901a\u308a\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3053\u306f\u3001\/\u4ee5\u4e0b\u306b\u3044\u304d\u306a\u308awordpress\u3092\u7f6e\u304b\u305a\u3001\u4ed6\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3082\u3042\u308b\u3001wordpress\u63a8\u5968\uff08\u3063\u3066\u308f\u3051\u3067\u3082\u306a\u3055\u305d\u3046\u3060\u3051\u3069\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306a\u3093\u304b\u306b\u3001\u305d\u306e\u4ed5\u69d8\u3067\u6c7a\u3081\u6253\u3061\u3057\u3066\u3042\u308b\u3082\u306e\u304c\u3042\u308b\uff09\u306e\u69cb\u6210\u3067\u306f\u306a\u304f\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u305f\u304f\u306a\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3082\u3042\u308b\u306e\u3067\u3001\u30b9\u30eb\u30fc\u306e\u8a2d\u5b9a\u304c\u3044\u307e\u3044\u3061\u5206\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u516c\u5f0f\u306elocation\u306e\u9805\u76ee\u3092\u898b\u308b\u3068\u3001<\/p>\n<ul>\n<li>location = \/ &#8212; \/\u3060\u3051\u306b\u30d2\u30c3\u30c8\u3059\u308b\u3002<\/li>\n<li>location \/ &#8212;\/\u4ee5\u4e0b\u305c\u3093\u3076\u304c\u5bfe\u8c61<\/li>\n<p>\u4ee5\u4e0a\u304c\u7279\u5225\u306a\u3082\u306e\u3067\u3001\u4ee5\u4e0b\u3001<\/p>\n<li>location ~* &#8212;\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u6b63\u898f\u8868\u73fe<\/li>\n<li>location ~ &#8212;\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3059\u308b\u6b63\u898f\u8868\u73fe<\/li>\n<\/ul>\n<p>\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\u3059\u308c\u3070\u826f\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>proxy_cache\u306a\u3093\u305f\u3089\u3092\u66f8\u304b\u305a\u3001proxy_pass\u3060\u3051\u66f8\u3051\u3070\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b\u98db\u3070\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code>##backend\u306eapache2\u3092\u6307\u5b9a\r\nupstream my_backend {\r\n    server 127.0.0.1:xxxx weight=1 fail_timeout=10s; --\u3053\u3053\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304c\u4e00\u3064\u306a\u306e\u3067weight,fail_timeout\u306f\u98fe\u308a\r\n}\r\nserver {\r\n    #################\r\n    # \u305d\u306e\u4ed6\u3001\u5fc5\u8981\u306a\u8a2d\u5b9a\r\n    #################\r\n\r\n    #\u4ee5\u4e0b\u3001\u9664\u5916\u8a2d\u5b9a\r\n    #\/\u304c\u66f4\u65b0\u3092\u62fe\u3063\u3066\u304f\u308bphp\u306a\u306e\u3067\u3001\u5e38\u6642\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304b\u3089\r\n    location = \/ {\r\n        proxy_pass   http:\/\/my_backend;\r\n    }\r\n\r\n    #wordpress\u4ee5\u5916\u306e\u30da\u30fc\u30b8\u306f\u5e38\u6642\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304b\u3089\r\n    location [regex] {\r\n        proxy_pass   http:\/\/my_backend;\r\n    }\r\n}<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3001\u9664\u5916\u8a2d\u5b9a\u3082\u307c\u3061\u307c\u3061\u3002<\/p>\n<p>\u3042\u3068\u3001edit_post\u306e\u30d5\u30c3\u30af\u3067\u30ad\u30e3\u30c3\u30b7\u30e5\u5168\u6d88\u3057\u306f\u4f01\u753b\u5012\u308c\u3063\u307d\u3044\u2026\u2026\u3002<\/p>\n<p>edit_post\u306e\u30d5\u30c3\u30af\u306b\u3001\u4e0b\u66f8\u304d\u3068\u3057\u3066\u4fdd\u5b58\u3082\u3001\u81ea\u52d5\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3082\u542b\u307e\u308c\u308b\u306e\u3067\u3001\u81ea\u52d5\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304c\u52d5\u304f\u305f\u3073\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u6d88\u3048\u308bw<\/p>\n<p>\u3055\u3059\u304c\u306b\u3053\u306e\u307e\u307e\u3067\u306f\u6d88\u3057\u3059\u304e\u2026\u2026\u3002<\/p>\n<p>publish_post(\u6295\u7a3f\u3092\u516c\u958b\uff09\u3001publish_page(\u56fa\u5b9a\u30da\u30fc\u30b8\u3092\u516c\u958b\uff09\u3001publish_to_draft\uff08\u6295\u7a3f\u3092\u4e0b\u66f8\u304d\u306b\u623b\u3059\uff09\u3001edit_comment\uff08\u30b3\u30e1\u30f3\u30c8\u8ffd\u52a0\u524a\u9664\uff09\u306b\u30d5\u30c3\u30af\u3092\u639b\u3051\u308b\u3053\u3068\u306b<\/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8a18\u4e8b\u4f5c\u6210\u6642\u306b\u30d7\u30ec\u30d3\u30e5\u30fc\u304c\u52b9\u304b\u306a\u3044\u306e\u306f\u3001WordPress Nginx proxy cache integrator\u306b\u308f\u304b\u308a\u3084\u3059\u3044\u8a2d\u5b9a\u4f8b\u304c\u3042\u3063\u3066\u3001\u305d\u308c\u3092\u3001nginx\u516c\u5f0f\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u898b\u306a\u304c\u3089\u66f8\u304d\u76f4\u3057\u305f\u3089\u3001\u304a\u304a\u3080\u306d\u4e88\u5b9a\u901a\u308a\u306b [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[],"class_list":["post-1408","post","type-post","status-publish","format-standard","hentry","category-ubuntu","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1408"}],"version-history":[{"count":0,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1408\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}