ruby-on-railssslpuma

How to configure Rails with Puma to use SSL?


I only found how to start puma using SSL:

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

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

Thanks!


Solution

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

    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'
    

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