配置WEBrick在Rails 4中使用SSL [英] Configuring WEBrick to use SSL in Rails 4

查看:59
本文介绍了配置WEBrick在Rails 4中使用SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要在SharePoint 2013上部署的Rails应用程序.

I have a Rails App that I want to deploy on SharePoint 2013.

为了实现某种身份验证方式,我需要WEBrick server服务ssl https并在port https://localhost:3001上侦听传入的https.不幸的是,我在配置服务器方面经验不足.

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.

任何提示都将不胜感激.

Any tips are greatly appreciated.

推荐答案

我知道您要求使用WEBrick,请原谅我提出其他建议,但我真的建议您使用

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

别忘了在宝石文件中添加 gem'thin';-)

Just don't forget to add gem 'thin' in your Gemfile ;-)

这篇关于配置WEBrick在Rails 4中使用SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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