Rack ssl not working with Thin

和自甴很熟 提交于 2019-12-30 09:58:46

问题


I installed rack ssl for Rails 3.07 per these instructions: http://www.simonecarletti.com/blog/2011/05/configuring-rails-3-https-ssl/

It is not working. The first https request (for the login page) is made and the page is served securely, but when you login it redirects to a non-secure http URL.

I am running Thin server. Does it work for Thin? What about Webrick?

Any ideas? Thanks.


回答1:


For Thin, you can pass your SSL information in using the following options:

$ thin --help

SSL options:
    --ssl                        Enables SSL
    --ssl-key-file PATH          Path to private key
    --ssl-cert-file PATH         Path to certificate
    --ssl-verify                 Enables SSL certificate verification

If you would like to configure Webrick to use SSL, this article from this question seems to work.



来源:https://stackoverflow.com/questions/7125663/rack-ssl-not-working-with-thin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!