Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3.1 使用SSL运行的Rails 3.1应用程序-TLS服务器名称指示支持错误?_Ruby On Rails 3.1_Passenger_Osx Server - Fatal编程技术网

Ruby on rails 3.1 使用SSL运行的Rails 3.1应用程序-TLS服务器名称指示支持错误?

Ruby on rails 3.1 使用SSL运行的Rails 3.1应用程序-TLS服务器名称指示支持错误?,ruby-on-rails-3.1,passenger,osx-server,Ruby On Rails 3.1,Passenger,Osx Server,我有一个简单的Rails 3.1.rc6应用程序,用于在测试服务器OS X 10.7服务器上测试SSL配置。我用的是Phusion乘客和Apache 如果不使用SSL,我可以毫无问题地运行应用程序。当我在我的environments/production.rb文件中通过Apache或config.force_SSL=true启用SSL时,页面加载时不会出错,但它大部分是空的,不是我的站点。它看起来好像试图从一个空目录中提供文件 我检查了,它只提到添加config.force_ssl=true选项

我有一个简单的Rails 3.1.rc6应用程序,用于在测试服务器OS X 10.7服务器上测试SSL配置。我用的是Phusion乘客和Apache

如果不使用SSL,我可以毫无问题地运行应用程序。当我在我的environments/production.rb文件中通过Apache或config.force_SSL=true启用SSL时,页面加载时不会出错,但它大部分是空的,不是我的站点。它看起来好像试图从一个空目录中提供文件

我检查了,它只提到添加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\u ssl=false时一样

编辑:更多信息。我在/var/log/apache2/error\u log中看到了以下内容:


这看起来像是Lion服务器的配置错误。最后,在文件/etc/apache2/extra/httpd-vhosts.conf中修复了它,方法是在行名称virtualhost*:80之后添加行名称virtualhost*:443。我假设,如果服务器承载多个SSL站点,它会自动执行此操作,但事实证明它没有

[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