如何使用 Puma 配置 Rails 以使用 SSL? [英] How to configure Rails with Puma to use SSL?

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

问题描述

我只找到了如何使用 SSL 启动 puma:

<代码>$ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert'

但是,文档中没有关于如何包含中间 CA 证书的说明.有人能指出我正确的方向吗?我正在使用 Puma 1.6.3

However, there is no description about how to include an intermediate CA cert in the documentation. Could someone point me in the right direction? I am using Puma 1.6.3

谢谢!

推荐答案

仅当您使用 nginx 时,组合证书和捆绑包才有效.

Combining certificate and bundle will work only if you use nginx.

如果没有 nginx,您可以使用 caverify_mode 选项:

Without nginx, you can use ca and verify_mode options:

rails s puma -b 'ssl://0.0.0.0:9292?key=path_to_key.key&cert=path_to_cert.crt&verify_mode=none&ca=path_to_root_bundle.crt'

来源:https://github.com/puma/puma/blob/master/lib/puma/binder.rb

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

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