在 Rails 3.0 中配置 Webrick 以同时提供 http 和 https (SSL)
我正在尝试在我的应用程序中使用 Rails 3.0 的 ssl_requiremnt 插件。我的应用程序中的一些链接需要使用 SSL 来保证安全,其余的则需要仅通过 http 提供服务。我根据这篇文章配置了webrick: http://www.nearinfinity.com/blogs/chris_rohr /configuring_webrick_to_use_ssl.html
现在我希望 webrick 同时提供 http 和 https 服务。使用 Rails 2.3 似乎很容易。
有人可以帮我吗?
I am trying to use ssl_requiremnt plugin for rails 3.0 in my app. A few links in my app need to be secure with SSL and the rest need to be served by http only. I configured webrick according to this post: http://www.nearinfinity.com/blogs/chris_rohr/configuring_webrick_to_use_ssl.html
Now I want webrick to serve both http and https. It seems it was easy with rails 2.3.
Could someone please help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过切换 Nginx 解决了这个问题,但使用 Webrick 却无法做到这一点。我猜 Webrick 不支持同时服务器的两个实例,要切换,您需要停止当前服务器并重新启动具有 https:// 设置的服务器。
I solved the issue by switching Nginx but could not do it using Webrick. I guess Webrick does not support two instances of a server simultaneously and to switch you need to stop the current server and restart the server which has got https:// settings.