2

Rails アプリを webrick から apache を使用してパッセンジャーに移動するには、いくつかの助けが必要です。私はこれらすべてに非常に慣れていないので、パッセンジャーで実行することはできません。私はたくさんのガイドを試しましたが、乗客の代わりにWebrickを常に使用しているRailsサーバー以外にエラーは発生していません。サーバーとしてMac mini OSXに取り組んでいます

osx には mac のバージョンが既にインストールされていることがわかりましたが、新しいコピーをロードする必要があることをオンラインで読んだので、現在インストールされている Apache がシステム設定/共有/Web 共有で実行されていないことを確認しました。

それから私brew install apachetopgem 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
4

1 に答える 1

0

「レール サーバーを実行してみてください。しかし、webrick を使用してまだ実行されています」、webrick がまだアクティブなようです。

lsof -i -P |grep 3000
kill -9 WEBRICK_PID
于 2011-07-21T12:18:41.270 に答える