在瘦服务器上的 rails 应用程序中启用 https [英] Enable https in a rails app on a thin server

查看:26
本文介绍了在瘦服务器上的 rails 应用程序中启用 https的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在 heroku 上运行瘦服务器的 rails 应用程序.它目前使用http.我想使用 https 进行机器人开发和生产.我从哪里开始做这件事.

I have a rails app running a thin server on heroku. It currently uses http. I would like to use https for bot development and production. Where do I begin to do this.

我看过这个 railscast,其中展示了如何使用 POW 服务器.我不想用POW服务器,我想用瘦服务器.

I have looked at this railscast where they show how to use a POW server. I dont want to use a POW server, I want to use a Thin server.

我还查看了这里:但在这里他们假设您已经安装了打开的 ssl.

I also looked here: But here they assume that you have open ssl insatlled.

我还没有找到任何展示如何从头开始在瘦服务器上运行 https 的地方.

I haven't found any place which shows how to run https on a thin server from scratch.

我想知道是否有人有任何建议.

I was wondering if anyone has any suggestions.

谢谢

推荐答案

我不知道你是否需要它,但这对我有帮助:

I don't know if you need it, but this helped me:

  thin start --ssl --ssl-verify --ssl-key-file ssllocal/server.key
--ssl-cert-file ssllocal/server.crt

编辑 ssl 密钥和 ssl 文件的路径.例如我的钥匙在 paypal 文件夹中,所以命令是

edit path to ssl key and ssl fild. For example my keys were in paypal folder, so command was

    thin start --ssl --ssl-verify --ssl-key-file paypal/server.key
--ssl-cert-file paypal/server.crt

如果你有问题,你可以看看这篇文章 - Thin with SSL支持和 ruby​​ 调试.

希望这会有所帮助.

If you will have problems you can look at this post - Thin with SSL support and ruby-debug.

Hope this helps.

这篇关于在瘦服务器上的 rails 应用程序中启用 https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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