{"id":408,"date":"2007-08-26T14:51:44","date_gmt":"2007-08-26T05:51:44","guid":{"rendered":"http:\/\/ecpplus.net\/weblog\/?p=408"},"modified":"2020-06-15T22:20:47","modified_gmt":"2020-06-15T13:20:47","slug":"rails%e3%81%aeredirect_to%e3%81%a7https%e3%81%ab%e8%a1%8c%e3%81%8b%e3%81%aa%e3%81%84%e4%bb%b6with-pound","status":"publish","type":"post","link":"https:\/\/ecpplus.net\/weblog\/rails%e3%81%aeredirect_to%e3%81%a7https%e3%81%ab%e8%a1%8c%e3%81%8b%e3%81%aa%e3%81%84%e4%bb%b6with-pound\/","title":{"rendered":"Rails\u306eredirect_to\u3067https\u306b\u884c\u304b\u306a\u3044\u4ef6(with pound)"},"content":{"rendered":"<p>\u3000\u6700\u8fd1\u306e\u904b\u7528\u306f\u3001\u307b\u3068\u3093\u3069 lighttpd + Pound \u3067\u3084\u3063\u3066\u307e\u3059\u3002\u901f\u5ea6\u9762\u3067 lighttpd \u306e\u65b9\u304c\u6709\u5229\u3002 ab \u3067\u30d9\u30f3\u30c1\u3068\u3063\u3066\u307f\u3066\u3082 lighttpd \u306e\u65b9\u304c3\u5272\u7a0b\u9ad8\u901f\u306a\u69d8\u5b50\u3002Pound \u306f\u8a2d\u5b9a\u3082\u67d4\u8edf\u3067SSL\u306e\u30e9\u30c3\u30d1\u3082\u51fa\u6765\u308b\u306e\u3067\u5927\u5909\u3088\u3044\u611f\u3058\u3067\u3059\u3002<\/p>\n<p>\u3000\u3055\u3066\u3001Rails\u306b\u306fssl_requirement \u3068\u304b SSL\u306b\u95a2\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3082\u3042\u3063\u305f\u308a\u3057\u307e\u3059\u3002request.ssl? \u3067\u30ea\u30af\u30a8\u30b9\u30c8\u304cssl\u304b\u3069\u3046\u304b\u53d6\u308c\u305f\u308a\u3082\u3059\u308b\u306e\u3067\u7c21\u5358\u306b\u5207\u66ff\u306f\u51fa\u6765\u308b\u3093\u3067\u3059\u304c\u3001Pound\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u3069\u3046\u3082 redirect_to \u3067 https \u306b\u98db\u3070\u3057\u3066\u3082 http \u306b\u66f8\u304d\u5909\u308f\u3063\u3066\u3057\u307e\u3046(\u00b4\uff65\u03c9\uff65`)  \u8abf\u3079\u3066\u3082\u305d\u3093\u306a\u8a18\u4e8b\u304c\u3061\u3089\u307b\u3089\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u3000Pound\u3092\u631f\u3093\u3067\u3082\u3001request.ssl? \u306f\u4f7f\u3048\u307e\u3059\u3002\u3067\u3082\u3001\u81ea\u5206\u3067 https \u306b redirect_to \u3057\u3066\u3082\u3084\u3063\u3071http \u306b\u884c\u3063\u3061\u3083\u3046\u306e\u3067 Pound\u3067\u8a2d\u5b9a\u3002<\/p>\n<p>\u3000\u3084\u308a\u305f\u3044\u3053\u3068\u306f\u3001\u3042\u308bURL\u306e\u30da\u30fc\u30b8\u3060\u3051\u30bb\u30ad\u30e5\u30a2\u306b\u3057\u305f\u3044\u306e\u3067 https \u306b\u98db\u3070\u3059\u3063\u3066\u3044\u3046\u51e6\u7406\u3002<\/p>\n<p>\u3000HTTP\u3067\u6765\u305f\u30a2\u30af\u30bb\u30b9\u306e\u3046\u3061\u3001\u8a72\u5f53\u3059\u308bURL\u3092\u6b63\u898f\u8868\u73fe\u3067\u66f8\u3044\u3066 https \u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u51e6\u7406\u3092\u66f8\u3044\u3066\u3042\u3052\u308c\u3070OK\u3002\u3061\u306a\u307f\u306b\u3001Redirect &#8220;http:\/\/ecpplus.net&#8221; \u3068\u304b\u66f8\u3044\u3066\u304a\u304f\u3068\u3001tdl \u4ee5\u4e0b\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u9020\u306f\u305d\u306e\u307e\u307e\u6301\u3061\u8d8a\u3057\u3066 https \u306b\u98db\u3093\u3067\u304f\u308c\u308b\u306e\u3067\u3001\u7279\u306b\u4f55\u3082\u8003\u3048\u308b\u5fc5\u8981\u306a\u3057\u3002\u7d20\u6674\u3089\u3057\u3044(\u00b4\u2200`)<\/p>\n<p>\u3000\u3051\u3069\u3001\u6839\u672c\u7684\u306a\u89e3\u6c7a\u306b\u306a\u3063\u3066\u306a\u3044\u306e\u3067\u65b9\u6cd5\u3092\u8abf\u3079\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<pre>ListenHTTPS\n  Address 192.168.100.100\n  Port 443\n\n   Service\n    HeadRequire \"Host: ecpplus.net\"\n    BackEnd\n      Address 127.0.0.1\n      Port 8000\n      Timeout 120\n    End\n  End\nEnd\n\nListenHTTP\n  Address 192.168.100.100\n  Port 80\n\n  Service\n    HeadRequire \"Host: ecpplus.net\"\n    URL \"\/(blog|diary)\"\n    Redirect \"https:\/\/ecpplus.net\"\n  End\n\n  Service\n    HeadRequire \"Host: ecpplus.net\"\n    BackEnd\n      Address 127.0.0.1\n      Port 8000\n      Timeout 120\n    End\n  End\nEnd<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u6700\u8fd1\u306e\u904b\u7528\u306f\u3001\u307b\u3068\u3093\u3069 lighttpd + Pound \u3067\u3084\u3063\u3066\u307e\u3059\u3002\u901f\u5ea6\u9762\u3067 lighttpd \u306e\u65b9\u304c\u6709\u5229\u3002 ab \u3067\u30d9\u30f3\u30c1\u3068\u3063\u3066\u307f\u3066\u3082 lighttpd \u306e\u65b9\u304c3\u5272\u7a0b\u9ad8\u901f\u306a\u69d8\u5b50\u3002Pound \u306f\u8a2d\u5b9a\u3082\u67d4\u8edf\u3067SSL\u306e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2521,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[10],"class_list":["post-408","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-rails"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/comments?post=408"}],"version-history":[{"count":2,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/408\/revisions"}],"predecessor-version":[{"id":2565,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/408\/revisions\/2565"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media\/2521"}],"wp:attachment":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media?parent=408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/categories?post=408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/tags?post=408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}