ホーム > 未分類 > Passenger(mod_rails for Apache)を試す

Passenger(mod_rails for Apache)を試す

Passenger(mod_rails for Apache)をインストールしてみました。
試した環境は

  • MaxOSX Tiger
  • Apache2.2(MacPortsでインストール済み)

です。

apacheが複数インストールされている場合は対象のApache apxsを指定する必要があるようです。

> export APXS2=/opt/local/apache2/bin/apxs

まずgemでインストールして、

> sudo gem install passenger -y

mod_railsをインストール。

> sudo passenger-install-apache2-module

ありゃ。

### In ext/apache2:
g++ -flat_namespace -bundle -undefined dynamic_lookup Utils.o Logging.o Configuration.o Hooks.o mod_passenger.o -fPIC -o mod_passenger.so   -lstdc++ -lpthread ../boost/src/libboost_thread.a -L/opt/local/lib -lapr-1
/usr/bin/ld: flag: -undefined dynamic_lookup can't be used with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
collect2: ld returned 1 exit status
rake aborted!
Command failed with status (1): [g++ -flat_namespace -bundle -undefined dyn...]
/opt/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/rakefile:132
(See full trace by running task with --trace)

明らかに怪しいので MACOSX_DEPLOYMENT_TARGET を設定してリトライ。

> export MACOSX_DEPLOYMENT_TARGET=10.4
> sudo passenger-install-apache2-module

とおった。

The Apache 2 module was successfully installed.

以下のように表示されるので、httpd.confに設定を追加。

Please edit your Apache configuration file, and add these lines:

LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/ext/apache2/mod_passenger.so
RailsSpawnServer /opt/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/bin/passenger-spawn-server
RailsRuby /opt/local/bin/ruby

VirtualHostの設定でrailsアプリケーションの位置を指定。

<VirtualHost *:80>
        ServerName test.hoge.com
        DocumentRoot /path/to/rails/public
</VirtualHost>

apacheを再起動。

> apachectl configtest
> sudo apachectl restart

無事動作しました。
mod_rails(passenger)はmogrelの3倍メモリを食う? らしいですが、どちらを使おうか。

ちなみにapacheを再起動することなく、railsアプリケーションを再読み込みしたい場合はrailsアプリのtmpディレクトリに restart.txt を置けば(または更新すれば)よいとのこと。ふむ。
Passenger users guide

カテゴリー: 未分類 タグ: , ,
  1. 2020 年 9 月 22 日 08:46 | #1

    how canadian pharmacies sale viagra
    buy viagra online canada https://www.v1agrabuy.com/ buy cialis online
    how to make natural viagra

  2. 2020 年 9 月 22 日 09:07 | #2

    I wanted to thank you for this excellent read!! I absolutely enjoyed every bit of it. I have you bookmarked to check out new stuff you post…

  3. 2020 年 9 月 22 日 09:24 | #3

    Hi, I do believe this is an excellent site. I stumbledupon it ;) I will come back once again since I saved as a favorite it. Money and freedom is the best way to change, may you be rich and continue to guide others.

  4. 2020 年 9 月 22 日 09:28 | #4

    [url=http://www.humanraces.us.com/][b]Human Races[/b][/url]

  5. 2020 年 9 月 22 日 09:35 | #5

    Spot on with this write-up, I honestly believe that this site needs far more attention. I’ll probably be returning to see more, thanks for the information!

  6. 2020 年 9 月 22 日 09:40 | #6

    Pretty! This was a really wonderful post. Thank you for supplying this information.

  7. 2020 年 9 月 22 日 09:41 | #7

    Everything is very open with a clear explanation of the issues. It was truly informative. Your website is very useful. Thanks for sharing!

  8. 2020 年 9 月 22 日 09:58 | #8

    Excellent article. I will be dealing with some of these issues as well..

  9. 2020 年 9 月 22 日 10:01 | #9

    Hi! I could have sworn I’ve visited your blog before but after looking at some of the articles I realized it’s new to me. Anyways, I’m definitely pleased I discovered it and I’ll be bookmarking it and checking back frequently!

  10. 2020 年 9 月 22 日 10:09 | #10

    An outstanding share! I have just forwarded this onto a co-worker who was doing a little homework on this. And he actually bought me dinner due to the fact that I discovered it for him… lol. So let me reword this…. Thanks for the meal!! But yeah, thanx for spending some time to talk about this topic here on your internet site.

  11. 2020 年 9 月 22 日 10:14 | #11

    Spot on with this write-up, I actually believe this amazing site needs a great deal more attention. I’ll probably be returning to read through more, thanks for the advice!

  12. 2020 年 9 月 22 日 10:25 | #12

    I have to thank you for the efforts you have put in penning this site. I am hoping to view the same high-grade blog posts from you in the future as well. In truth, your creative writing abilities has encouraged me to get my own, personal website now ;)

  13. 2020 年 9 月 22 日 10:28 | #13

    I seriously love your website.. Pleasant colors & theme. Did you create this site yourself? Please reply back as I’m looking to create my very own blog and want to find out where you got this from or what the theme is called. Thanks!

  14. 2020 年 9 月 22 日 10:30 | #14

    Good post. I will be experiencing a few of these issues as well..

  15. 2020 年 9 月 22 日 10:40 | #15

    This is the perfect website for anybody who wants to understand this topic. You realize so much its almost tough to argue with you (not that I personally will need to…HaHa). You certainly put a new spin on a subject that’s been discussed for a long time. Excellent stuff, just wonderful!

  16. 2020 年 9 月 22 日 10:53 | #16

    Hello there! I simply want to give you a huge thumbs up for the great info you’ve got right here on this post. I will be returning to your blog for more soon.

  17. 2020 年 9 月 22 日 11:02 | #17

    Hello there! I could have sworn I’ve been to this site before but after looking at some of the posts I realized it’s new to me. Nonetheless, I’m certainly pleased I came across it and I’ll be bookmarking it and checking back frequently!

  18. 2020 年 9 月 22 日 11:03 | #18

    Good post. I learn something totally new and challenging on websites I stumbleupon on a daily basis. It’s always helpful to read through articles from other writers and practice something from their web sites.

  19. 2020 年 9 月 22 日 11:20 | #19

    https://hempdj.com cbd oil for sale

  20. 2020 年 9 月 22 日 11:22 | #20

    [url=http://www.nikeoutletstoreonlineshopping.us/][b]Nike Outlet[/b][/url]

  21. 2020 年 9 月 22 日 11:26 | #21

    Pretty! This was an incredibly wonderful article. Thank you for supplying this information.

  22. 2020 年 9 月 22 日 11:34 | #22

    [url=http://www.jordan11s.us/][b]Jordan 11s[/b][/url]

  23. 2020 年 9 月 22 日 11:40 | #23

    You’re so awesome! I do not suppose I’ve read a single thing like this before. So good to find another person with some original thoughts on this topic. Seriously.. thank you for starting this up. This site is something that is needed on the web, someone with a bit of originality!

  24. 2020 年 9 月 22 日 11:52 | #24

    Excellent article. I definitely appreciate this website. Stick with it!

  25. 2020 年 9 月 22 日 12:25 | #25

    Everything is very open with a clear clarification of the challenges. It was truly informative. Your website is very useful. Thank you for sharing!

  26. 2020 年 9 月 22 日 12:29 | #26

    Excellent site you have here.. It’s difficult to find high-quality writing like yours these days. I really appreciate people like you! Take care!!

  27. 2020 年 9 月 22 日 12:32 | #27

    Great post. I am dealing with a few of these issues as well..

  28. 2020 年 9 月 22 日 13:02 | #28

    This web site really has all the info I wanted concerning this subject and didn’t know who to ask.

  29. 2020 年 9 月 22 日 13:48 | #29

    cialis sold in pharmacy in ontario

    cialis professional
    tadalafil 20mg kopen Bulky ked

コメントページ
1 293 294 295 19
  1. 2020 年 4 月 14 日 16:04 | #1
  2. 2020 年 4 月 16 日 16:14 | #2
  3. 2020 年 4 月 20 日 03:03 | #3
  4. 2020 年 4 月 25 日 13:09 | #4
  5. 2020 年 4 月 26 日 09:02 | #5
  6. 2020 年 4 月 30 日 20:59 | #6
  7. 2020 年 5 月 8 日 23:33 | #7
  8. 2020 年 5 月 10 日 04:08 | #8
  9. 2020 年 6 月 22 日 19:25 | #9
  10. 2020 年 7 月 1 日 23:36 | #10
  11. 2020 年 7 月 11 日 21:18 | #11
  12. 2020 年 7 月 26 日 20:59 | #12
  13. 2020 年 7 月 30 日 12:05 | #13
  14. 2020 年 8 月 8 日 01:19 | #14
  15. 2020 年 9 月 8 日 11:48 | #15
  16. 2020 年 9 月 19 日 08:11 | #16
  17. 2020 年 9 月 22 日 06:22 | #17