Sak*_*thi 7 webrick ruby-on-rails-3.2 ubuntu-12.04
一直试图在ubuntu 12.0.4中使用webrick在ssl上创建一个刚刚创建的新应用程序.
尝试了我所知道的所有可能的方法.尝试使用config.force_ssl =真在application.rb中,也force_ssl在应用控制器.
出于某些原因,当我在firefox上使用https:// loacalhost:3000时,我收到一条错误消息,
###An error occurred during a connection to localhost:3000.###
###SSL received a record that exceeded the maximum permissible length.###
###(Error code: ssl_error_rx_record_too_long)###
Run Code Online (Sandbox Code Playgroud)
在谷歌浏览器中,错误消息是,
SSL connection error### ###Unable to make a secure connection to the server. This may be a problem with the server.or it may be requiring a client authentication certificate that you don't have.
Run Code Online (Sandbox Code Playgroud)
服务器日志显示,
[2012-07-22 16:26:04] ERROR bad URI `?D/i?b???\\??)?F6??????c???"?\e\x00\x00H\x00??'.
[2012-07-22 16:26:47] ERROR bad Request-Line `\x16\x03\x01\x00?\x01\x00\x00?\x03\x01P\v?onC??\x1D??\x16\x16R!NU?????\r'?\x05???
w??\x00\x00H\x00??'.
Run Code Online (Sandbox Code Playgroud)
还尝试使用webrick和乘客在生产模式下运行应用程序.没有帮助.
看起来与公钥没有交付给客户有关.我可能错了.
小智 14
您在开发模式下使用的服务器似乎不向客户端提供ssl证书.
对于开发目的,如果使用以下命令启动服务器,则可以使用"Thin",因为它提供了ssl证书:
"瘦开始 - 而不是通常的:
"rails s/rails服务器"
| 归档时间: |
|
| 查看次数: |
3296 次 |
| 最近记录: |