{"action":"created","issue":{"url":"https://api.github.com/repos/puma/puma/issues/1126","repository_url":"https://api.github.com/repos/puma/puma","labels_url":"https://api.github.com/repos/puma/puma/issues/1126/labels{/name}","comments_url":"https://api.github.com/repos/puma/puma/issues/1126/comments","events_url":"https://api.github.com/repos/puma/puma/issues/1126/events","html_url":"https://github.com/puma/puma/issues/1126","id":187557780,"number":1126,"title":"Https puma 3.6.0 (ruby 2.3.1-p112), ssl","user":{"login":"dawidof","id":1425756,"avatar_url":"https://avatars.githubusercontent.com/u/1425756?v=3","gravatar_id":"","url":"https://api.github.com/users/dawidof","html_url":"https://github.com/dawidof","followers_url":"https://api.github.com/users/dawidof/followers","following_url":"https://api.github.com/users/dawidof/following{/other_user}","gists_url":"https://api.github.com/users/dawidof/gists{/gist_id}","starred_url":"https://api.github.com/users/dawidof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dawidof/subscriptions","organizations_url":"https://api.github.com/users/dawidof/orgs","repos_url":"https://api.github.com/users/dawidof/repos","events_url":"https://api.github.com/users/dawidof/events{/privacy}","received_events_url":"https://api.github.com/users/dawidof/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-06T12:10:07Z","updated_at":"2016-11-08T06:30:52Z","closed_at":null,"body":"Hi,\r\nI'm trying to run locally ssl \r\nMy puma.rb config is\r\n```\r\n\r\napp_dir = File.expand_path(\"../..\", __FILE__)\r\npath_to_key = app_dir + '/server.key'\r\npath_to_cert = app_dir + '/server.crt'\r\n\r\nshared_dir = \"#{app_dir}/shared\"\r\nif ENV['RAILS_ENV'] == 'production'\r\n\tenvironment 'production'\r\n\tworkers 1\r\n\tthreads 1, 20\r\n\r\n\t# Set up socket location\r\n\tbind \"unix://#{shared_dir}/sockets/puma.sock\"\r\n\r\n\t# Logging\r\n\tstdout_redirect \"#{app_dir}/log/puma.stdout.log\", \"#{app_dir}/log/puma.stderr.log\", true\r\n\r\n\tactivate_control_app\r\n\tdaemonize true\r\nelse\r\n\tworkers 4\r\n\tthreads_count = ENV.fetch(\"RAILS_MAX_THREADS\") { 10 }.to_i\r\n\tthreads threads_count, threads_count\r\n\tport        ENV.fetch(\"PORT\") { 3000 }\r\n\tenvironment 'development'\r\n\r\n\tssl_bind '127.0.0.1', '3000', {\r\n\t  key: path_to_key,\r\n\t  cert: path_to_cert,\r\n\t  verify_mode: 'none'\r\n\t}\r\n\t# ssl_bind '127.0.0.1', '3000', { key: path_to_key, cert: path_to_cert }\r\n\t# bind 'ssl://127.0.0.1:3000?key='+path_to_key+'&cert='+path_to_cert\r\n\t# bind 'tcp://127.0.0.1:3000?key='+path_to_key+'&cert='+path_to_cert\r\n\t# bind 'tcp://127.0.0.1:3000?key='+path_to_key+'&cert='+path_to_cert+'&verify_mode=none'\r\n\r\nend\r\n\r\npidfile \"#{shared_dir}/pids/puma.pid\"\r\nstate_path \"#{shared_dir}/pids/puma.state\"\r\n\r\npreload_app!\r\n\r\non_worker_boot do\r\n  ActiveRecord::Base.establish_connection if defined?(ActiveRecord)\r\nend\r\n\r\nplugin :tmp_restart\r\n```\r\n\r\nI've got MacOS Sierra, running rails 5.0.0.1\r\nWhile starting rails got output\r\n```\r\n=> Booting Puma\r\n=> Rails 5.0.0.1 application starting in development on http://localhost:3000\r\n=> Run `rails server -h` for more startup options\r\n2016-11-06T11:53:47.228Z 40368 TID-owvxfoj5w DEBUG: Enabling Rails 5+ live code reloading, so hot!\r\n[40368] Puma starting in cluster mode...\r\n[40368] * Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity\r\n[40368] * Min threads: 10, max threads: 10\r\n[40368] * Environment: development\r\n[40368] * Process workers: 4\r\n[40368] * Preloading application\r\n[40368] * Listening on tcp://localhost:3000\r\n[40368] Use Ctrl-C to stop\r\n[40368] - Worker 1 (pid: 40436) booted, phase: 0\r\n[40368] - Worker 2 (pid: 40437) booted, phase: 0\r\n[40368] - Worker 3 (pid: 40438) booted, phase: 0\r\n[40368] - Worker 0 (pid: 40435) booted, phase: 0\r\n```\r\n\r\nTried to change config (commented out), tried to pass verify_mode option and without.\r\nTried to reinstall puma, as it was written here [https://github.com/puma/puma/issues/971](https://github.com/puma/puma/issues/971).\r\n\r\nBut in any case, after requesting http://localhost:3000 chrome shows an error, \r\n```\r\nThis site can’t provide a secure connection\r\n\r\nlocalhost sent an invalid response.\r\n```\r\n\r\nlog in console\r\n```\r\n2016-11-06 13:06:07 +0100: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>\r\n2016-11-06 13:06:07 +0100: ENV: {\"rack.version\"=>[1, 3], \"rack.errors\"=>#<IO:<STDERR>>, \"rack.multithread\"=>true, \"rack.multiprocess\"=>false, \"rack.run_once\"=>false, \"SCRIPT_NAME\"=>\"\", \"QUERY_STRING\"=>\"\", \"SERVER_PROTOCOL\"=>\"HTTP/1.1\", \"SERVER_SOFTWARE\"=>\"puma 3.6.0 Sleepy Sunday Serenity\", \"GATEWAY_INTERFACE\"=>\"CGI/1.2\"}\r\n---\r\n2016-11-06 13:06:07 +0100: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>\r\n2016-11-06 13:06:07 +0100: ENV: {\"rack.version\"=>[1, 3], \"rack.errors\"=>#<IO:<STDERR>>, \"rack.multithread\"=>true, \"rack.multiprocess\"=>false, \"rack.run_once\"=>false, \"SCRIPT_NAME\"=>\"\", \"QUERY_STRING\"=>\"\", \"SERVER_PROTOCOL\"=>\"HTTP/1.1\", \"SERVER_SOFTWARE\"=>\"puma 3.6.0 Sleepy Sunday Serenity\", \"GATEWAY_INTERFACE\"=>\"CGI/1.2\"}\r\n---\r\n2016-11-06 13:06:07 +0100: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>\r\n2016-11-06 13:06:07 +0100: ENV: {\"rack.version\"=>[1, 3], \"rack.errors\"=>#<IO:<STDERR>>, \"rack.multithread\"=>true, \"rack.multiprocess\"=>false, \"rack.run_once\"=>false, \"SCRIPT_NAME\"=>\"\", \"QUERY_STRING\"=>\"\", \"SERVER_PROTOCOL\"=>\"HTTP/1.1\", \"SERVER_SOFTWARE\"=>\"puma 3.6.0 Sleepy Sunday Serenity\", \"GATEWAY_INTERFACE\"=>\"CGI/1.2\"}\r\n---\r\n```\r\nMaking cert and key using this instruction [https://gist.github.com/tadast/9932075](https://gist.github.com/tadast/9932075)"},"comment":{"url":"https://api.github.com/repos/puma/puma/issues/comments/259057039","html_url":"https://github.com/puma/puma/issues/1126#issuecomment-259057039","issue_url":"https://api.github.com/repos/puma/puma/issues/1126","id":259057039,"user":{"login":"pavan461","id":19260347,"avatar_url":"https://avatars.githubusercontent.com/u/19260347?v=3","gravatar_id":"","url":"https://api.github.com/users/pavan461","html_url":"https://github.com/pavan461","followers_url":"https://api.github.com/users/pavan461/followers","following_url":"https://api.github.com/users/pavan461/following{/other_user}","gists_url":"https://api.github.com/users/pavan461/gists{/gist_id}","starred_url":"https://api.github.com/users/pavan461/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavan461/subscriptions","organizations_url":"https://api.github.com/users/pavan461/orgs","repos_url":"https://api.github.com/users/pavan461/repos","events_url":"https://api.github.com/users/pavan461/events{/privacy}","received_events_url":"https://api.github.com/users/pavan461/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T06:30:52Z","updated_at":"2016-11-08T06:30:52Z","body":"@dawidof Is your above issue fixed, i'm also facing same issue!"}}
{"actor":{"display_login":"pavan461"}}