개발을위한 스크립트/레일 파일에 다음 코드를 추가
module Rails
class Server < ::Rack::Server
def default_options
super.merge({
:Port => 3445,
:environment => (ENV['RAILS_ENV'] || "development").dup,
:daemonize => false,
:debugger => false,
:pid => File.expand_path("tmp/pids/server.pid"),
:config => File.expand_path("config.ru"),
:SSLEnable => true,
:SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
:SSLPrivateKey => OpenSSL::PKey::RSA.new(
File.open("/home/mohanraj/myCA/server_key.pem").read),
:SSLCertificate => OpenSSL::X509::Certificate.new(
File.open("/home/mohanraj/myCA/server_crt.pem").read),
:SSLCertName => [["CN", WEBrick::Utils::getservername]]
})
end
end
end
참고 : ssl 파일의 올바른 경로를 알려주십시오.
것은 재 지정이 링크를 따르십시오
http://www.railway.at/2013/02/12/using-ssl-in-your-local-rails-environment/
의
가능한 중복 [당신이 개발에 SSL을 처리하려면 어떻게합니까?] (http://stackoverflow.com/questions/2118685/how-do-you-handle-ssl- 개발 중) –