{"id":13790,"date":"2016-08-01T11:35:57","date_gmt":"2016-08-01T02:35:57","guid":{"rendered":"http:\/\/vitalify.jp\/blog\/?p=13790"},"modified":"2016-10-12T14:59:14","modified_gmt":"2016-10-12T05:59:14","slug":"ruby-on-rails%e3%82%92webrick%e3%81%8b%e3%82%89apache%ef%bc%88passenger%ef%bc%89%e3%81%ab%e5%a4%89%e6%9b%b4%e3%80%82","status":"publish","type":"post","link":"https:\/\/vitalify.jp\/blog\/2016\/08\/ruby-on-rails%e3%82%92webrick%e3%81%8b%e3%82%89apache%ef%bc%88passenger%ef%bc%89%e3%81%ab%e5%a4%89%e6%9b%b4%e3%80%82.html","title":{"rendered":"Ruby on Rails\u3092Webrick\u304b\u3089Apache\uff08Passenger\uff09\u306b\u5909\u66f4\u3002"},"content":{"rendered":"<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/vitalify.jp\/blog\/wp-content\/uploads\/2016\/08\/wow-300x268.png\" alt=\"wow\" width=\"300\" height=\"268\" class=\"alignleft size-medium wp-image-13796\" srcset=\"https:\/\/vitalify.jp\/blog\/wp-content\/uploads\/2016\/08\/wow-300x268.png 300w, https:\/\/vitalify.jp\/blog\/wp-content\/uploads\/2016\/08\/wow.png 688w\" sizes=\"(max-width: 300px) 85vw, 300px\" \/><br \/>\n\u3069\u3046\u3082\u3002<br \/>\n\u4f0a\u85e4\u3067\u3059\u3002<\/p>\n<p>\u5148\u6708\u3001\u81ea\u793e\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u300c<a href=\"https:\/\/vitalify.jp\/lp\/wow\/\" target=\"_blank\">WOW<\/a>\u300d\u306e<a href=\"https:\/\/play.google.com\/store\/apps\/details?id=jp.vitalify.wow\" target=\"_blank\">Android\u7248<\/a>\u3092\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f\u3002<br \/>\nWOW\u306f\u3001\u3053\u3053\u6700\u8fd1\u591a\u3044\u691c\u7d22\u578b\u306e\u30de\u30c3\u30c1\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u306a\u304f\u3001<strong>\u5076\u7136\u306e\u51fa\u4f1a\u3044\u3092\u697d\u3057\u3080\u305f\u3081\u306e\u65b0\u3057\u3044\u30de\u30c3\u30c1\u30f3\u30b0\u624b\u6bb5<\/strong>\u3067\u3059\u3002<br \/>\niOS\u7248\u3082\u4eca\u6708\u4e2d\u306b\u30ea\u30ea\u30fc\u30b9\u4e88\u5b9a\u3067\u3059\u306e\u3067\u662f\u975e\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\uff01<\/p>\n<p><!--more--><\/p>\n<p>\u672c\u984c\u306b\u623b\u308a\u307e\u3059\u3002<br \/>\n\u4e0a\u8ff0\u3057\u305fWOW\u306e\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u306fRoR\u3067\u958b\u767a\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u958b\u767a\u5f53\u6642\u306fWeb\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066Webrick\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u3002<br \/>\nWebrick\u306fWeb\u30b5\u30fc\u30d0\u30fc\u3082\u68b1\u5305\u3057\u305f\u5f62\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5171\u6709\u3067\u304d\u308b\u305f\u3081\u3001\u958b\u767a\u6642\u3084\u5c0f\u898f\u6a21\u30b5\u30fc\u30d3\u30b9\u3001\u30df\u30cb\u30de\u30e0\u30b9\u30bf\u30fc\u30c8\u3068\u3044\u3046\u70b9\u3067\u306f\u975e\u5e38\u306b\u512a\u308c\u3066\u3044\u307e\u3059\u304c\u3001Apache\u3084Nginx\u306a\u3069Web\u30b5\u30fc\u30d0\u30fc\u5c02\u7528\u3067\u4f5c\u3089\u308c\u305f\u3082\u306e\u3068\u6bd4\u8f03\u3059\u308b\u3068\u3084\u306f\u308a\u6027\u80fd(\u51e6\u7406\u901f\u5ea6\u306a\u3069)\u3084\u6c4e\u7528\u6027\u306f\u52a3\u308a\u307e\u3059\u3002<br \/>\n\u5b9f\u969b\u306bApache Bench\u3067\u901f\u5ea6\u3092\u6bd4\u8f03\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001Apache\u3084Nginx\u306e\u65b9\u304c\u512a\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u672c\u756a\u74b0\u5883\u306eWeb\u30b5\u30fc\u30d0\u30fc\u3092Webrick\u304b\u3089Apache + passenger\u306b\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<br \/>\n\u307e\u305a\u306f\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<p>Apache\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<code>$ sudo yum install httpd httpd-devel<\/code><\/p>\n<p>passenger\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\npassenger\u306fRails\u3092Apache\u3067\u52d5\u304b\u3059\u305f\u3081\u306eApache\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002<br \/>\n<code>$ sudo gem install passenger<\/code><\/p>\n<p>\u6b21\u306b\u3001passenger\u30e2\u30b8\u30e5\u30fc\u30eb\u306eApache\u3078\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<code>$ sudo passenger-install-apache2-module<\/code><\/p>\n<p>\u4f1a\u8a71\u5f0f\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u958b\u59cb\u3055\u308c\u308b\u306e\u3067Enter\u30ad\u30fc\u3092\u62bc\u4e0b\u3057\u306a\u304c\u3089\u9032\u3081\u307e\u3059\u3002\uff08\u8a00\u8a9e\u3067\u306f\u5fc5\u305a\u300cRuby\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff09<br \/>\n\u5fc5\u8981\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u7121\u3044\u5834\u5408\u306f\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3001\u306a\u3089\u3073\u306b\u89aa\u5207\u306b\u30b3\u30de\u30f3\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u753b\u9762\u306b\u5f93\u3044\u5fc5\u8981\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n\u6674\u308c\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u6b63\u5e38\u7d42\u4e86\u3059\u308b\u3068\u3001\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u7d50\u679c\u306e\u6700\u5f8c\u306bhttpd.conf\u306b\u8ffd\u8a18\u304c\u5fc5\u8981\u306a\u8a18\u8ff0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n<code>LoadModule passenger_module \/usr\/local\/rvm\/gems\/ruby-2.2.3\/gems\/passenger-5.0.29\/buildout\/apache2\/mod_passenger.so<br \/>\n&lt;IfModule mod_passenger.c&gt;<br \/>\n  PassengerRoot \/usr\/local\/rvm\/gems\/ruby-2.2.3\/gems\/passenger-5.0.29<br \/>\n  PassengerDefaultRuby \/usr\/local\/rvm\/gems\/ruby-2.2.3\/wrappers\/ruby<br \/>\n&lt;\/IfModule&gt;<\/code><\/p>\n<p>\u30b3\u30d4\u30fc\u3092\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u30fb\u30fb\u30fb\u3068\u3044\u3046\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8a18\u8ff0\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3054\u5b89\u5fc3\u304f\u3060\u3055\u3044\u3002<br \/>\n<code>passenger-install-apache2-module --snippet<\/code><\/p>\n<p>\u4e0a\u8a18\u306e\u8a18\u8ff0\u5185\u5bb9\u3092httpd.cof\u306b\u8a18\u8f09\u3057\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<code>&lt;VirtualHost *:80&gt;<br \/>\n    DocumentRoot \/var\/www\/foge\/public<br \/>\n    ServerName sample<br \/>\n    RackEnv production<br \/>\n    ...<br \/>\n    ...<br \/>\n    ...<br \/>\n&lt;\/VirtualHost&gt;<\/code><br \/>\nDocumentRoot\u306b\u306fRails\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306epublic\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\nRackEnv\u306f\u7528\u9014\u306b\u3088\u308aproduction\u307e\u305f\u306fdevelopment\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066Apache\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<br \/>\nWebrick\u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u4e14\u3064\u540c\u3058\u30dd\u30fc\u30c8\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u30b3\u30f3\u30d5\u30ea\u30af\u30c8\u3059\u308b\u305f\u3081\u3001Webrick\u3092\u505c\u6b62\u3057\u3066\u304b\u3089Apache\u3092\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n<code>sudo apachectl restart<\/code><\/p>\n<p>\u3053\u308c\u3067Apache(Passenger)\u7d4c\u7531\u3067Ruby on Rails\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u3002<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/vitalify.jp\/blog\/2016\/08\/ruby-on-rails%e3%82%92webrick%e3%81%8b%e3%82%89apache%ef%bc%88passenger%ef%bc%89%e3%81%ab%e5%a4%89%e6%9b%b4%e3%80%82.html\" layout=\"button_count\" action=\"like\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/vitalify.jp\/blog\/2016\/08\/ruby-on-rails%e3%82%92webrick%e3%81%8b%e3%82%89apache%ef%bc%88passenger%ef%bc%89%e3%81%ab%e5%a4%89%e6%9b%b4%e3%80%82.html\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/vitalify.jp\/blog\/2016\/08\/ruby-on-rails%e3%82%92webrick%e3%81%8b%e3%82%89apache%ef%bc%88passenger%ef%bc%89%e3%81%ab%e5%a4%89%e6%9b%b4%e3%80%82.html\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"Ruby on Rails\u3092Webrick\u304b\u3089Apache\uff08Passenger\uff09\u306b\u5909\u66f4\u3002\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_tumblr\"><a href=\"\/\/www.tumblr.com\/share?v=3&u=https%3A%2F%2Fvitalify.jp%2Fblog%2F2016%2F08%2Fruby-on-rails%25e3%2582%2592webrick%25e3%2581%258b%25e3%2582%2589apache%25ef%25bc%2588passenger%25ef%25bc%2589%25e3%2581%25ab%25e5%25a4%2589%25e6%259b%25b4%25e3%2580%2582.html&t=Ruby%20on%20Rails%E3%82%92Webrick%E3%81%8B%E3%82%89Apache%EF%BC%88Passenger%EF%BC%89%E3%81%AB%E5%A4%89%E6%9B%B4%E3%80%82\" title=\"Share on Tumblr\" style=\"display:inline-block; text-indent:-9999px; overflow:hidden; width:81px; height:20px; background:url('\/\/platform.tumblr.com\/v1\/share_1.png') top left no-repeat transparent;\">Share on Tumblr<\/a><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/vitalify.jp\/blog\/2016\/08\/ruby-on-rails%e3%82%92webrick%e3%81%8b%e3%82%89apache%ef%bc%88passenger%ef%bc%89%e3%81%ab%e5%a4%89%e6%9b%b4%e3%80%82.html\" data-text=\"Ruby on Rails\u3092Webrick\u304b\u3089Apache\uff08Passenger\uff09\u306b\u5909\u66f4\u3002\" data-lang=\"ja\">Tweet<\/a><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u3002 \u4f0a\u85e4\u3067\u3059\u3002 \u5148\u6708\u3001\u81ea\u793e\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u300cWOW\u300d\u306eAndroid\u7248\u3092\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f\u3002 WOW\u306f\u3001\u3053\u3053\u6700\u8fd1\u591a\u3044\u691c\u7d22\u578b\u306e\u30de\u30c3\u30c1\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u306a\u304f\u3001\u5076\u7136\u306e\u51fa\u4f1a\u3044\u3092\u697d\u3057\u3080\u305f\u3081\u306e\u65b0\u3057\u3044\u30de\u30c3\u30c1\u30f3\u30b0\u624b\u6bb5\u3067\u3059\u3002 iOS\u7248\u3082\u4eca &hellip; <a href=\"https:\/\/vitalify.jp\/blog\/2016\/08\/ruby-on-rails%e3%82%92webrick%e3%81%8b%e3%82%89apache%ef%bc%88passenger%ef%bc%89%e3%81%ab%e5%a4%89%e6%9b%b4%e3%80%82.html\" class=\"more-link more_btn\"><span class=\"screen-reader-text\">&#8220;Ruby on Rails\u3092Webrick\u304b\u3089Apache\uff08Passenger\uff09\u306b\u5909\u66f4\u3002&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/posts\/13790"}],"collection":[{"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/comments?post=13790"}],"version-history":[{"count":18,"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/posts\/13790\/revisions"}],"predecessor-version":[{"id":14216,"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/posts\/13790\/revisions\/14216"}],"wp:attachment":[{"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/media?parent=13790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/categories?post=13790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vitalify.jp\/blog\/wp-json\/wp\/v2\/tags?post=13790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}