0

テストサーバー(OS X 10.7サーバー)でSSL構成をテストするために使用している単純なRails 3.1.rc6アプリがあります。Phusion Passenger と Apache を使用しています。

SSL を使用しない場合、問題なくアプリを実行できます。Apache 経由またはファイル内経由config.force_ssl = trueでSSL を有効にするenvironments/production.rbと、ページはエラーなしで読み込まれますが、ほとんど空で、自分のサイトではありません。空のディレクトリからファイルを提供しようとしているかのように見えます。

SSL の構成について Edge Rails のドキュメントを確認したconfig.force_ssl = trueところ、Rack::SSL ミドルウェアが自動的に使用されるというオプションの追加についてのみ言及されています。

ページをロードすると、次のように表示されます。

Index of /

    Name    Last modified   Size    Description

Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.8 Server at mysite.mydomain.com Port 443

Rails アプリで ssl 構成行を削除し、サーバー ツールを使用してサイトを SSL に強制すると (テスト用に自己署名証明書を選択します)、まったく同じことが起こります。... myapp/current/public持っているときのように、フォルダーを提供するには何を変更する必要がありますconfig.force_ssl = falseか?

編集:もう少し情報。に次のように表示され/var/log/apache2/error_logます。

[Fri Aug 26 10:57:49 2011] [notice] caught SIGTERM, shutting down
[Fri Aug 26 10:57:50 2011] [warn] RSA server certificate CommonName (CN) `My-Mac-mini.local' does NOT match server name!?
...
[Fri Aug 26 10:57:50 2011] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
httpd: Could not reliably determine the server's fully qualified domain name, using myserver.local for ServerName
[Fri Aug 26 10:57:50 2011] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Fri Aug 26 10:57:50 2011] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Fri Aug 26 10:57:50 2011] [warn] RSA server certificate CommonName (CN) `My-Mac-mini.local' does NOT match server name!?
...
[Fri Aug 26 10:57:50 2011] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Fri Aug 26 10:57:50 2011] [notice] Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.8 configured -- resuming normal operations
cache: [GET /] miss
4

1 に答える 1

0

これは、Lion サーバーの構成バグのようです。最後に、行の後に行/etc/apache2/extra/httpd-vhosts.confを追加して、ファイル内で修正しました。サーバーが複数の SSL サイトをホストしている場合、サーバーは自動的にそれを行うと想定していましたが、そうではないことが判明しました。NameVirtualHost *:443NameVirtualHost *:80

于 2011-08-29T12:13:25.277 に答える