{"id":578,"date":"2018-04-22T20:31:49","date_gmt":"2018-04-22T11:31:49","guid":{"rendered":"http:\/\/www.ranran.mydns.jp\/blog\/?p=578"},"modified":"2018-04-22T20:37:05","modified_gmt":"2018-04-22T11:37:05","slug":"1%e3%81%a4%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%a7mastodon%e3%81%a8pleroma%e3%82%92%e9%81%8b%e7%94%a8%e3%81%99%e3%82%8b%e3%81%a8%e7%9b%b8%e4%ba%92%e3%81%ab%e3%83%95%e3%82%a9%e3%83%ad","status":"publish","type":"post","link":"http:\/\/www.ranran.mydns.jp\/blog\/?p=578","title":{"rendered":"1\u3064\u306e\u30b5\u30fc\u30d0\u30fc\u3067Mastodon\u3068Pleroma\u3092\u904b\u7528\u3059\u308b\u3068\u76f8\u4e92\u306b\u30d5\u30a9\u30ed\u30fc\u3067\u304d\u306a\u3044\u4ef6"},"content":{"rendered":"<p>\u3046\u3061\u306e\u9bd6\u3067\u306fDocker\u3067\u69cb\u7bc9\u3057\u305fMastodon\u3068Pleroma\u3068Misskey\u306e\u5404\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092VirtualHost\u3067\u30c9\u30e1\u30a4\u30f3\u3054\u3068\u306b\u632f\u308a\u5206\u3051\u308b\u904b\u7528\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u305f\u3060\u3001\u5916\u90e8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u306f\u30d5\u30a9\u30ed\u30fc\u3057\u5408\u3048\u308b\u306e\u306b\u5185\u90e8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u540c\u58eb\u3067\u306f\u30d5\u30a9\u30ed\u30fc\u3067\u304d\u305a\u306b\u56f0\u3063\u3066\u304a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3067\u3001\u539f\u56e0\u3092\u63a2\u3063\u305f\u3089\u4ee5\u4e0b\u306e\u624b\u9806\u3092\u8e0f\u3080\u3053\u3068\u3067\u56de\u907f\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u25a0\u56de\u907f\u65b9\u6cd5<\/p>\n<ol>\n<li>DNS\u3084hosts\u3092\u4f7f\u3063\u3066\u540d\u524d\u89e3\u6c7a\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/li>\n<li>Mastodon\u306e\u30bd\u30fc\u30b9\u3092\u3044\u3058\u308b\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>\u9806\u306b\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\uff11\uff0eDNS\u3084hosts\u3092\u4f7f\u3063\u3066\u540d\u524d\u89e3\u6c7a\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u307e\u3042\u3001\u3053\u308c\u306f\u771f\u3063\u5148\u306b\u7591\u3046\u3053\u3068\u3067\u3059\u3088\u306d\uff3e\uff3e\uff1b<\/p>\n<p style=\"padding-left: 30px;\">LAN\u5185\u90e8\u304b\u3089\u30c9\u30e1\u30a4\u30f3\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u306f\u5185\u90e8DNS\u3092\u69cb\u7bc9\u3059\u308b\u304bhosts\u3092\u66f8\u304d\u63db\u3048\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u3046\u3061\u306f<a href=\"http:\/\/www.ranran.mydns.jp\/blog\/?p=453\">\u5185\u90e8DNS\u3092\u69cb\u7bc9\u6e08\u307f<\/a>\u3060\u3063\u305f\u305f\u3081\u3053\u3044\u3064\u306b\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067\u6e08\u307f\u307e\u3057\u305f\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u305d\u3057\u3066\u3001\u76f8\u4e92\u306b\u540d\u524d\u89e3\u6c7a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u3059\u304c\u3053\u308c\u3060\u3051\u3067\u306f\u4e0d\u5341\u5206\u3068\u3044\u3046\u30fb\u30fb\u30fb\u30fb<\/p>\n<p style=\"padding-left: 30px;\">\uff08\u4e00\u5fdcMastodon\u306e\u691c\u7d22\u6b04\u3067&#8221;@\u540d\u524d@\u30c9\u30e1\u30a4\u30f3&#8221;\u3067\u691c\u7d22\u3057\u305f\u969b\u306e\u30a8\u30e9\u30fc\u304c\u300c503 Remote data could not be fetched\u300d\u2192\u300c422 Mastodon::HostValidationError on \u30c9\u30e1\u30a4\u30f3\u300d\u3068\u5909\u5316\u3057\u307e\u3057\u305f\uff09<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\uff12\uff0eMastodon\u306e\u30bd\u30fc\u30b9\u3092\u3044\u3058\u308b\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u3053\u306e\u300c422 Mastodon::HostValidationError\u300d\u3063\u3066\u30a8\u30e9\u30fc\u306b\u3064\u3044\u3066\u8abf\u3079\u3066\u307f\u3066\u3082\u3088\u304f\u308f\u304b\u3093\u306a\u3044(422\u3063\u3066WebDav\u62e1\u5f35\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3089\u3057\u3044\u3067\u3059\u304c\u30fb\u30fb\u30fb\uff09<\/p>\n<p style=\"padding-left: 30px;\">\u3057\u3087\u3046\u304c\u306a\u3044\u306e\u3067Mastodon\u306e\u30bd\u30fc\u30b9\u3092\u898b\u3066\u300cMastodon::HostValidationError\u300d\u304c\u30b9\u30ed\u30fc\u3055\u308c\u3066\u3044\u308b\u7b87\u6240\u3092\u898b\u3066\u307f\u308b\u3068<\/p>\n<p style=\"padding-left: 30px;\"><a href=\"https:\/\/github.com\/tootsuite\/mastodon\/blob\/master\/app\/lib\/request.rb\">app\/lib\/request.rb<\/a>(135\u884c\u76ee)\u306b\u6c17\u306b\u306a\u308b\u90e8\u5206\u3092\u767a\u898b\u3002<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\n        Addrinfo.foreach(host, nil, nil, :SOCK_STREAM) do |address|\r\n          begin\r\n            raise Mastodon::HostValidationError if PrivateAddressCheck.private_address? IPAddr.new(address.ip_address)\r\n            return super address.ip_address, *args\r\n          rescue =&gt; e\r\n            outer_e = e\r\n          end\r\n        end\r\n<\/pre>\n<p style=\"padding-left: 30px;\">\u3053\u308c\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30a2\u30c9\u30ec\u30b9\u306e\u5834\u5408\u306f\u554f\u7b54\u7121\u7528\u306bHostValidationError\u306b\u3057\u3066\u3044\u308b\uff1f\uff1f<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 30px;\">\u3067\u3001PrivateAddressCheck\u306b\u3064\u3044\u3066\u8abf\u3079\u3066\u307f\u308b\u3068<a href=\"https:\/\/github.com\/tootsuite\/mastodon\/blob\/master\/config\/environments\/development.rb\">config\/environments\/development.rb<\/a>\u3067\u308f\u3056\u308f\u3056false\u3092\u8fd4\u3059\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u3092\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u3068\u3044\u3046\u3053\u3068\u306f\u3053\u3053\u306e\u30c1\u30a7\u30c3\u30af\u3067false\u3068\u306a\u308b\u3088\u3046\u306b\u3059\u308c\u3070\u3044\u3044\u306e\u3067\u306f\uff1f\uff1f\u3063\u3068\u601d\u3044<a href=\"https:\/\/github.com\/tootsuite\/mastodon\/blob\/master\/config\/environments\/production.rb\">config\/environments\/production.rb<\/a>\u5074\u306b\u4ee5\u4e0b\u306e\u8a18\u8f09\u3092\u8ffd\u8a18\u3002<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\nmodule PrivateAddressCheck\r\n def self.private_address?(*)\r\n false\r\n end\r\nend\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u305d\u3057\u3066Docker\u30b3\u30f3\u30c6\u30ca\u3092\u30d3\u30eb\u30c9\u3057\u306a\u304a\u3057\u3066\u307f\u308b\u3068\u30fb\u30fb\u30fb\u30fb<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\n$ docker-compose build web\r\n$ docker-compose up -d\r\n\r\n<\/pre>\n<p>\u7121\u4e8b\u691c\u7d22\u6b04\u3067&#8221;@\u540d\u524d@\u30c9\u30e1\u30a4\u30f3&#8221;\u3067\u691c\u7d22\u3057\u3066\u3082\u3061\u3083\u3093\u3068\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff56\uff3e\uff3e\uff56<\/p>\n<p><a href=\"http:\/\/www.ranran.mydns.jp\/blog\/wp-content\/uploads\/2018\/04\/kennsaku.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-588 size-thumbnail\" src=\"http:\/\/www.ranran.mydns.jp\/blog\/wp-content\/uploads\/2018\/04\/kennsaku-293x300.png\" alt=\"\" width=\"293\" height=\"300\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u30d5\u30a9\u30ed\u30fc\u3067\u304d\u306a\u3044\u554f\u984c\u306f\u89e3\u6c7a\u3057\u305f\u3093\u3067\u3059\u304c\u4ee5\u4e0b\u306e\uff12\u3064\u304c\u6c17\u306b\u306a\u308b\u3002\u3002\u3002<\/p>\n<ol>\n<li>Mastodon\u306f\u306a\u305c\u308f\u3056\u308f\u3056\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30a2\u30c9\u30ec\u30b9\u3092\u306f\u3058\u304f\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u306e\u304b\uff1f<\/li>\n<li>\u3053\u306e\u5bfe\u5fdc\u306e\u4ed5\u65b9\u3067\u4e0d\u90fd\u5408\u304c\u8d77\u304d\u308b\u3053\u3068\u306f\u306a\u3044\u306e\u304b\uff1f<\/li>\n<\/ol>\n<p>\u305d\u3093\u306a\u308f\u3051\u3067\u3053\u306e\u5bfe\u51e6\u65b9\u6cd5\u306f\u81ea\u5df1\u8cac\u4efb\u3067\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3046\u3061\u306e\u9bd6\u3067\u306fDocker\u3067\u69cb\u7bc9\u3057\u305fMastodon\u3068Pleroma\u3068Misskey\u306e\u5404\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092VirtualHost\u3067\u30c9\u30e1\u30a4\u30f3\u3054\u3068\u306b\u632f\u308a\u5206\u3051\u308b\u904b\u7528\u3092\u3057\u3066\u3044\u307e\u3059\u3002 &nbsp; \u305f\u3060\u3001\u5916\u90e8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u306f\u30d5\u30a9\u30ed\u30fc\u3057 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,43,30,31],"tags":[],"class_list":["post-578","post","type-post","status-publish","format-standard","hentry","category-docker","category-mastodon","category-oss","category-31"],"_links":{"self":[{"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=578"}],"version-history":[{"count":13,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/578\/revisions"}],"predecessor-version":[{"id":592,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/578\/revisions\/592"}],"wp:attachment":[{"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}