Rails アプリを webrick から apache を使用してパッセンジャーに移動するには、いくつかの助けが必要です。私はこれらすべてに非常に慣れていないので、パッセンジャーで実行することはできません。私はたくさんのガイドを試しましたが、乗客の代わりにWebrickを常に使用しているRailsサーバー以外にエラーは発生していません。サーバーとしてMac mini OSXに取り組んでいます
osx には mac のバージョンが既にインストールされていることがわかりましたが、新しいコピーをロードする必要があることをオンラインで読んだので、現在インストールされている Apache がシステム設定/共有/Web 共有で実行されていないことを確認しました。
それから私brew install apachetop
。gem install passenger
とが続きpassenger-install-apache2-module
ます。
次に、httpd.conf ファイルにコードを配置するよう求められるターミナルのパッセンジャーからの指示に従います。ルートから /ect/apache2 にあります。
次に、/public/mom が Rails アプリの場所である apache 構成ファイルにも仮想ホスト情報を追加します。
<VirtualHost *>
ServerName localhost:3000
DocumentRoot /public/mom
RailsEnv development
<Directory /public/mom>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
次に、Apache が sudo apachectl start で実行されていることを確認し、Rails サーバーを実行してみますが、それでも webrick を使用して実行されます。
私がインストールした正しいバージョンの apache でパッセンジャーがインストールされていることを確認する必要があるという投稿を見てきました。デフォルトではなく、インストールしたApacheを使用してパッセンジャーを強制的にインストールするにはどうすればよいですか? 構成ファイル内のサーバー名を localhost と名付けることはできますか? rails アプリを Passenger で実行する方法について、誰かが私にガイダンスを教えてくれますか。いくつかの手順を見逃したか、プロセスを完全に誤解した可能性があります。ありがとう
編集:以下はApacheのerror_logです
[Wed Jul 20 19:17:01 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using mini.local for ServerName
[Wed Jul 20 19:17:02 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 20 19:17:02 2011] [notice] Digest: done
[Wed Jul 20 19:17:02 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.7 configured -- resuming normal operations
[Wed Jul 20 19:17:22 2011] [notice] caught SIGTERM, shutting down
[Wed Jul 20 19:39:32 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using mini.local for ServerName
[Wed Jul 20 19:39:45 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 20 19:39:45 2011] [notice] Digest: done
[Wed Jul 20 19:39:45 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.7 configured -- resuming normal operations
[Wed Jul 20 19:43:33 2011] [notice] caught SIGTERM, shutting down
[Wed Jul 20 20:09:35 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
Warning: DocumentRoot [/public/mom] does not exist
httpd: Could not reliably determine the server's fully qualified domain name, using mini.local for ServerName
[Wed Jul 20 20:09:35 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 20 20:09:35 2011] [notice] Digest: done
[Wed Jul 20 20:09:35 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.7 configured -- resuming normal operations
[Thu Jul 21 10:36:59 2011] [notice] caught SIGTERM, shutting down