{"id":951,"date":"2012-03-12T01:59:53","date_gmt":"2012-03-11T16:59:53","guid":{"rendered":"http:\/\/blog.xcir.net\/?p=951"},"modified":"2012-03-13T01:11:59","modified_gmt":"2012-03-12T16:11:59","slug":"varnishlog%e3%82%92%e8%a6%8b%e3%82%84%e3%81%99%e3%81%8f%e3%81%99%e3%82%8b%e3%83%84%e3%83%bc%e3%83%ab%e3%82%92%e6%9b%b4%e3%81%ab%e5%bc%b7%e5%8c%96%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/blog.xcir.net\/?p=951","title":{"rendered":"varnishlog\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u30c4\u30fc\u30eb\u3092\u66f4\u306b\u5f37\u5316\u3057\u3066\u307f\u305f"},"content":{"rendered":"<p><a href=\"http:\/\/blog.xcir.net\/index.php\/2012\/01\/varnishlog%e3%82%92%e8%a6%8b%e3%82%84%e3%81%99%e3%81%8f%e3%81%99%e3%82%8b%e3%83%84%e3%83%bc%e3%83%ab%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f\/\" title=\"varnishlog\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\">\u3053\u306e\u524d<\/a>\u4f5c\u3063\u305fvarnishlog\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3059\u304c<br \/>\n\u6a5f\u80fd\u5f37\u5316\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u8ffd\u52a0\u6a5f\u80fd\u306f<\/p>\n<li>vcl_trace\u306e\u5024\u3092VCL\u30bd\u30fc\u30b9\u3067\u8868\u793a(@perbu\u3055\u3093\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8)<\/li>\n<li>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u72b6\u614b\u3092\u8868\u793a(@dai_yamashita\u3055\u3093\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8)<\/li>\n<p>\u3067\u3059<\/p>\n<h4>vcl_trace\u306e\u5024\u3092VCL\u30bd\u30fc\u30b9\u3067\u8868\u793a<\/h4>\n<p>\u4eca\u307e\u3067vcl_trace\u306e\u7d50\u679c\u306f\u5473\u6c17\u306a\u3044\u8868\u793a\u3067\u51fa\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3002-f\u30aa\u30d7\u30b7\u30e7\u30f3\u3067VCL\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u5b9f\u969b\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: plain; \">\n\r\n         | trace  | vrt_count:1 vcl_line:55 vcl_pos:1\r\n\n<\/pre>\n<p>\u2193<\/p>\n<pre class=\"brush: plain; \">\n\r\n         | trace  | set req.http.X-TEST1=campur_xcir.gethash();\r\n         |        | ^ (vrt_count:1 vcl_line:55 vcl_pos:1 src_name:input)\r\n\r\n\n<\/pre>\n<h4>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u72b6\u614b\u3092\u8868\u793a<\/h4>\n<p>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u306e\u72b6\u614b\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u904e\u53bb\u306e\u5c65\u6b74\u306f\u3068\u308a\u3042\u3048\u305awindow\u306e4\u500d\u3067\u3059<\/p>\n<pre class=\"brush: plain; \">\n\r\nbackend status\r\n------------------------------------------------------------\r\n\r\nname    | status  | past status\r\ndefault | healthy | YY\r\n\n<\/pre>\n<h4>\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3<\/h4>\n<p>\u307e\u305f\u3053\u308c\u3089\u306e\u6a5f\u80fd\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<h5>-f [vcl file]<\/h5>\n<p>VCL\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308avcl_trace\u3092\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002<\/p>\n<h5>-e [varnishd]<\/h5>\n<p>varnishd\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002vcl_trace\u306e\u89e3\u6c7a\u306b\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h5>-cc_command [cc_command]<\/h5>\n<p>varnish\u306ecc_command\u3067\u5171\u6709\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nvcl_trace\u306e\u89e3\u6c7a\u304c\u3044\u3089\u306a\u3044\u5834\u5408\u306f\u4e0d\u8981\u3067\u3059\u3002<\/p>\n<h5>&#8211;(backend|action|variable) [on|off]<\/h5>\n<p>\u305d\u308c\u305e\u308c\u306e\u60c5\u5831\u306e\u8868\u793a\u306eon\/off\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u5168\u3066on\u3067\u3059<\/p>\n<p>\u307e\u305f\u6a5f\u80fd\u7684\u306b\u5b89\u5b9a\u3057\u306a\u304f\u3066ON\u306b\u306f\u3057\u3066\u306a\u3044\u306e\u3067\u3059\u304c<\/p>\n<pre class=\"brush: php; \">\n\r\ndefine(&#039;experimental&#039; , false);\r\n\n<\/pre>\n<p>\u3092<\/p>\n<pre class=\"brush: php; \">\n\r\ndefine(&#039;experimental&#039; , true);\r\n\n<\/pre>\n<p>\u306b\u3057\u3066<br \/>\n\u8d77\u52d5\u6642\u306b&#8211;src=on\u3068-f=[vclfile]\u3068-e=[varnishd]\u3092\u6307\u5b9a\u3059\u308b\u3068VCL\u30d5\u30a1\u30a4\u30eb\u3067\u5b9f\u969b\u306b\u901a\u3063\u305f\u5834\u6240\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff08[exec]\uff09<\/p>\n<pre class=\"brush: plain; \">\n\r\n############################################################\r\nvcl trace\r\n[exec]      \/* &quot;input&quot;*\/\r\n[exec]  \/*\r\n\r\n\uff5e\u4e2d\u7565\uff5e\r\n\r\n[exec]  sub vcl_recv {\r\n[exec]      if (req.restarts == 0) {\r\n[exec]          if (req.http.x-forwarded-for) {\r\n                    set req.http.X-Forwarded-For =\r\n                        req.http.X-Forwarded-For + &quot;, &quot; + client.ip;\r\n[exec]          } else {\r\n[exec]              set req.http.X-Forwarded-For = client.ip;\r\n[exec]          }\r\n[exec]      }\r\n[exec]      if (req.request != &quot;GET&quot; &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;\r\n[exec]        req.request != &quot;HEAD&quot; &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;\r\n[exec]        req.request != &quot;PUT&quot; &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;\r\n[exec]        req.request != &quot;POST&quot; &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;\r\n\r\n\uff5e\u5f8c\u7565\uff5e\r\n\n<\/pre>\n<p>\u826f\u304b\u3063\u305f\u3089\u4f7f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044<br \/>\n<a href=\"https:\/\/github.com\/xcir\/varnishlogTrans\">varnishlogTrans<\/a><\/p>\n<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_hatena\"><a href='\/\/b.hatena.ne.jp\/add?mode=confirm&url=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D951&title=varnishlog%E3%82%92%E8%A6%8B%E3%82%84%E3%81%99%E3%81%8F%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB%E3%82%92%E6%9B%B4%E3%81%AB%E5%BC%B7%E5%8C%96%E3%81%97%E3%81%A6%E3%81%BF%E3%81%9F' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/hatena.gif' alt='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' width='16' height='12' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_hatena_users\"><a href='\/\/b.hatena.ne.jp\/entry\/https:\/\/blog.xcir.net\/?p=951' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - varnishlog\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u30c4\u30fc\u30eb\u3092\u66f4\u306b\u5f37\u5316\u3057\u3066\u307f\u305f' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='\/\/b.hatena.ne.jp\/entry\/image\/https:\/\/blog.xcir.net\/?p=951' alt='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - varnishlog\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u30c4\u30fc\u30eb\u3092\u66f4\u306b\u5f37\u5316\u3057\u3066\u307f\u305f' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - varnishlog\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u30c4\u30fc\u30eb\u3092\u66f4\u306b\u5f37\u5316\u3057\u3066\u307f\u305f'   class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_facebook\"><a href='http:\/\/www.facebook.com\/share.php?u=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D951&t=varnishlog%E3%82%92%E8%A6%8B%E3%82%84%E3%81%99%E3%81%8F%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB%E3%82%92%E6%9B%B4%E3%81%AB%E5%BC%B7%E5%8C%96%E3%81%97%E3%81%A6%E3%81%BF%E3%81%9F' title='Facebook \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/facebook.png' alt='Facebook \u306b\u30b7\u30a7\u30a2' title='Facebook \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_linkedin\"><a href='\/\/www.linkedin.com\/shareArticle?mini=true&url=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D951&title=varnishlog%E3%82%92%E8%A6%8B%E3%82%84%E3%81%99%E3%81%8F%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB%E3%82%92%E6%9B%B4%E3%81%AB%E5%BC%B7%E5%8C%96%E3%81%97%E3%81%A6%E3%81%BF%E3%81%9F' title='LinkedIn \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/linkedin.png' alt='LinkedIn \u306b\u30b7\u30a7\u30a2' title='LinkedIn \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/blog.xcir.net\/?p=951\" data-text=\"varnishlog\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u30c4\u30fc\u30eb\u3092\u66f4\u306b\u5f37\u5316\u3057\u3066\u307f\u305f\" data-lang=\"ja\">Tweet<\/a><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u524d\u4f5c\u3063\u305fvarnishlog\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3059\u304c \u6a5f\u80fd\u5f37\u5316\u3057\u307e\u3057\u305f\u3002 \u8ffd\u52a0\u6a5f\u80fd\u306f vcl_trace\u306e\u5024\u3092VCL\u30bd\u30fc\u30b9\u3067\u8868\u793a(@perbu\u3055\u3093\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8) \u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u72b6\u614b\u3092\u8868\u793a(@dai_yamash <a href='https:\/\/blog.xcir.net\/?p=951' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[5,35,36],"class_list":["post-951","post","type-post","status-publish","format-standard","hentry","category-3","tag-varnish","tag-varnishlog","tag-varnishlogtrans","category-3-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=951"}],"version-history":[{"count":13,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/951\/revisions"}],"predecessor-version":[{"id":973,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/951\/revisions\/973"}],"wp:attachment":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}