在 rails 3.0 中配置 Webrick 以提供 http 和 https (SSL) [英] Configuring Webrick in rails 3.0 to serve both http and https (SSL)

查看:38
本文介绍了在 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

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

现在我希望 webrick 同时提供 http 和 https.使用 rails 2.3 似乎很容易.

Now I want webrick to serve both http and https. It seems it was easy with rails 2.3.

有人可以帮我吗?

推荐答案

我通过切换 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.

这篇关于在 rails 3.0 中配置 Webrick 以提供 http 和 https (SSL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆