{"id":310,"date":"2013-02-25T00:12:46","date_gmt":"2013-02-24T15:12:46","guid":{"rendered":"http:\/\/www.prime-architect.co.jp\/myblog\/?p=310"},"modified":"2013-02-25T00:12:46","modified_gmt":"2013-02-24T15:12:46","slug":"vps%e3%81%abruby-on-rails%e7%92%b0%e5%a2%83%e3%82%92%e6%a7%8b%e7%af%89%e3%81%99%e3%82%8b%e3%80%82%e3%81%9d%e3%81%ae%ef%bc%92-apachepassenger%e3%81%ae%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/www.prime-architect.co.jp\/myblog\/ruby-310","title":{"rendered":"VPS\u306bRuby on Rails\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u3002\u305d\u306e\uff12 Apache+passenger\u306e\u8a2d\u5b9a"},"content":{"rendered":"<p>\u3055\u3066\u3001\u524d\u56de\u306frbenv\u3067ruby \u3068rails\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u306fApache+passenger\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>passenger\u306f\u524d\u56de\u66f8\u3044\u305f\u3088\u3046\u306bbundle install\u3067\u4e00\u7dd2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u4ee5\u4e0b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\npassenger-install-apache2-module\r\n<\/pre>\n<p>\u3068\u601d\u3044\u304d\u3084\u3001\u30b3\u30de\u30f3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093\u3001\u3068\u6012\u3089\u308c\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<br \/>\n\u3069\u3046\u3084\u3089\u30d1\u30b9\u304c\u901a\u3063\u3066\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30d5\u30eb\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<br \/>\n\u307e\u305a\u306ffind\u3067\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nsudo find \/ -name passenger-install-apache2-module\r\n\r\n\/home\/user\/.rbenv\/shims\/passenger-install-apache2-module\r\n\/home\/user\/.rbenv\/versions\/1.9.3-p385\/bin\/passenger-install-apache2-module\r\n\/home\/user\/.rbenv\/versions\/1.9.3-p385\/lib\/ruby\/gems\/1.9.1\/gems\/passenger-3.0.19\/bin\/passenger-install-apache2-module\r\n\r\n<\/pre>\n<p>\u3044\u307e\u3057\u305f\u3002<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30d5\u30eb\u30d1\u30b9\u5b9f\u884c \u3069\u30fc\u3093\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nsudo \/home\/user\/.rbenv\/versions\/1.9.3-p385\/bin\/passenger-install-apache2-module\r\n\r\nWelcome to the Phusion Passenger Apache 2 module installer, v3.0.19.\r\n\r\nThis installer will guide you through the entire installation process. It\r\nshouldn't take more than 3 minutes in total.\r\n\r\nHere's what you can expect from the installation process:\r\n\r\n 1. The Apache 2 module will be installed for you.\r\n 2. You'll learn how to configure Apache.\r\n 3. You'll learn how to deploy a Ruby on Rails application.\r\n\r\nDon't worry if anything goes wrong. This installer will advise you on how to\r\nsolve any problems.\r\n\r\nPress Enter to continue, or Ctrl-C to abort.\r\n\r\n<\/pre>\n<p>\u6765\u307e\u3057\u305f\u3002<br \/>\n\u3067\u3001\u3053\u306e\u307e\u307e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n\u3046\u307e\u304f\u3044\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u7d9a\u3044\u3066\u3001apache\u306e\u8a2d\u5b9a<br \/>\n\u307e\u305a\u306fconf\u30d5\u30a1\u30a4\u30eb\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\u3053\u3053\u304b\u3089\u306froot\u30e6\u30fc\u30b6\u3067\u884c\u304d\u307e\u3059\u3002sudo\u3067\u3082\u3044\u3044\u3067\u3059\u304c\u3002\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\/\/\u79fb\u52d5\r\ncd \/etc\/httpd\/conf.d\r\n\r\n\/\/\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u305f\u306b\u4f5c\u308a\u307e\u3059\u3002\r\nvi mod_passenger.conf\r\n\r\n\/\/\u4ee5\u4e0b\u3092\u66f8\u304d\u8fbc\u307f\u3002\u3053\u308c\u306fpassenger-install-apache2-module\u3092\u5b9f\u884c\u3059\u308b\u3068\u51fa\u3066\u304d\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3092\u30b3\u30d4\u307a\r\nLoadModule passenger_module \/home\/user\/.rbenv\/versions\/1.9.3-p385\/lib\/ruby\/gems\/1.9.1\/gems\/passenger-3.0.19\/ext\/apache2\/mod_passenger.so\r\nPassengerRoot \/home\/user\/.rbenv\/versions\/1.9.3-p385\/lib\/ruby\/gems\/1.9.1\/gems\/passenger-3.0.19\r\nPassengerRuby \/home\/user\/.rbenv\/versions\/1.9.3-p385\/bin\/ruby\r\n\r\n<\/pre>\n<p>\u7d9a\u3044\u3066httpd.conf\u306e\u8a2d\u5b9a<br \/>\n\u306a\u306e\u3060\u3051\u308c\u3069\u3001\u79c1\u306e\u30b5\u30fc\u30d0\u306f\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u306e\u3067<br \/>\nvhost.conf\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;VirtualHost *:80&gt;\r\n    DocumentRoot &quot;\/var\/www\/html\/aaaa\/myproject\/public&quot;\r\n    ServerName www.prime-architect.co.jp\r\n    RailsEnv production\r\n   &lt;Directory &quot;\/var\/www\/html\/aaaa\/myproject\/public&quot;&gt;\r\n      Options FollowSymLinks\r\n      order deny,allow\r\n      allow from All\r\n    &lt;\/Directory&gt;\r\n&lt;\/VirtualHost&gt;\r\n\r\n\r\n<\/pre>\n<p>\u3053\u308c\u3067apache\u3092\u518d\u8d77\u52d5\u3059\u308c\u3070OK\u3067\u3059\u3002<\/p>\n<p>\u3042\u3068\u306frake db:migrate\u306a\u3069\u3067\u9069\u5f53\u306bdb\u4f5c\u308c\u3070\u3046\u307e\u304f\u3044\u304f\u306f\u305a\uff1f<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3053\u308c\u304b\u3089\u3084\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><iframe src=\"http:\/\/rcm-jp.amazon.co.jp\/e\/cm?t=primearchitec-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4774146633&#038;ref=qf_sp_asin_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3001\u524d\u56de\u306frbenv\u3067ruby \u3068rails\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3057\u305f\u3002 \u4eca\u56de\u306fApache+passenger\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002 passenger\u306f\u524d\u56de\u66f8\u3044\u305f\u3088\u3046\u306bbundle install\u3067\u4e00\u7dd2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057 &hellip; <a href=\"https:\/\/www.prime-architect.co.jp\/myblog\/ruby-310\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;VPS\u306bRuby on Rails\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u3002\u305d\u306e\uff12 Apache+passenger\u306e\u8a2d\u5b9a&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[13],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/posts\/310"}],"collection":[{"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":17,"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/posts\/310\/revisions"}],"predecessor-version":[{"id":327,"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/posts\/310\/revisions\/327"}],"wp:attachment":[{"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/media?parent=310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/categories?post=310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.prime-architect.co.jp\/myblog\/wp-json\/wp\/v2\/tags?post=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}