Posted almost 5 years ago. Visible to the public.

How to enable SSL in development with Passenger standalone

Here is how to start your Rails application to accept both HTTP and HTTPS in development.

  1. gem install passenger

  2. Create a self-signed SSL certificate. Store the generated files in config/passenger-standalone-ssl.

  3. Create a Passengerfile.json at the project root with this content (or save the attached file):

    { "ssl": true, "ssl_port": 3001, "ssl_certificate": "config/passenger-standalone-ssl/server.crt", "ssl_certificate_key": "config/passenger-standalone-ssl/server.key" }

    If you just want to run Passenger without a config file, use this command to start Passenger:

    passenger start --ssl --ssl-port 3001 --ssl-certificate config/passenger-standalone-ssl/server.crt --ssl-certificate-key config/passenger-standalone-ssl/server.key
  4. passenger start

  5. Connect to https://localhost:3000/ for HTTP, to https://localhost:3001/ for HTTPS.

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Arne Hartherz
Last edit:
3 months ago
by Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more