配置 WEBrick 以在 Rails 4 中使用 SSL [英] Configuring WEBrick to use SSL in Rails 4
问题描述
我想在 SharePoint 2013 上部署一个 Rails 应用程序.
I have a Rails App that I want to deploy on SharePoint 2013.
为了实现某种认证方式,我需要WEBrick server
来服务ssl
https
并在上监听传入的https>port
https://localhost:3001
.不幸的是,我在配置服务器方面不是很有经验.
In order to achieve some means of authentication, I need the WEBrick server
to serve ssl
https
and listen to incoming https on port
https://localhost:3001
. Unfortunately, I am not very experienced with configuring the server.
我只找到了一些针对旧 Rails 版本的过时教程,这些教程似乎不再起作用了.
I've have only found some outdated tutorials for older Rails version, that don't seem to do the job anymore.
非常感谢任何提示.
推荐答案
我知道您要求使用 WEBrick,请原谅我提出其他建议,但我真的建议您使用 Thin ruby 网络服务器(更快、更轻),因此您也可以轻松启动 SSL 并满足您的要求:
I know you asked for WEBrick, and excuse me for suggesting something else, but I would really recommend you to use Thin ruby web server (faster and lighter), so you can also start SSL and meet your requirement as easy as:
$ thin start --ssl -p 3001
别忘了在你的 Gemfile 中添加 gem 'thin' ;-)
Just don't forget to add gem 'thin' in your Gemfile ;-)
这篇关于配置 WEBrick 以在 Rails 4 中使用 SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!