Local SSL with Ruby / Puma

I am running a local puma server and I cannot get the resources to upload to SSL.

I have a local signed certificate.

I am trying to start the server with the following configuration:

puma -b 'ssl://127.0.0.1:9292?key=/path/to/certs/localhost.unecrypted.key&cert=/path/to/certs/localhost.crt' 

Now, when I am in https://localhost:9292 or https://127.0.0.1:9292 , the browser just rotates and there is no response on the server. Resources are not returned. Twice he showed me the HTML header tag, but almost always get nothing.

Any idea? Other ideas? Actually, you need to run the https version of this application locally, and I cannot figure out how to do this.

Edit: An initial request is logged, but no response:

 127.0.0.1 - - [04/Sep/2013 11:29:15] "GET / HTTP/1.1" 200 1265 0.0397 

Sometimes I get this error:

 013-09-04 11:30:20 -0400: Read error: #<Errno::EPIPE: Broken pipe> /Users/wesbos/.rvm/gems/ ruby-1.9.3-p429@sinatra /gems/puma-2.3.2/lib/puma/minissl.rb:56:in `write' /Users/wesbos/.rvm/gems/ ruby-1.9.3-p429@sinatra /gems/puma-2.3.2/lib/puma/minissl.rb:56:in `write' /Users/wesbos/.rvm/gems/ ruby-1.9.3-p429@sinatra /gems/puma-2.3.2/lib/puma/server.rb:635:in `fast_write' /Users/wesbos/.rvm/gems/ ruby-1.9.3-p429@sinatra /gems/puma-2.3.2/lib/puma/server.rb:484:in `handle_request' /Users/wesbos/.rvm/gems/ ruby-1.9.3-p429@sinatra /gems/puma-2.3.2/lib/puma/server.rb:248:in `process_client' /Users/wesbos/.rvm/gems/ ruby-1.9.3-p429@sinatra /gems/puma-2.3.2/lib/puma/server.rb:147:in `block in run' /Users/wesbos/.rvm/gems/ ruby-1.9.3-p429@sinatra /gems/puma-2.3.2/lib/puma/thread_pool.rb:92:in `call' /Users/wesbos/.rvm/gems/ ruby-1.9.3-p429@sinatra /gems/puma-2.3.2/lib/puma/thread_pool.rb:92:in `block in spawn_thread' 
+6
source share
1 answer

Turns out Puma has SSL issues right now:

https://github.com/puma/puma/issues/350

Return to version 1.6.3 fixed for me

+1
source

Source: https://habr.com/ru/post/953169/


All Articles