我最近发现有些人更喜欢使用unicorn_rails默认的WEBrick作为Web服务器来开发Rails应用程序.
我知道如果我想在生产中使用独角兽,那么在开发中尝试它是有道理的,但由于配置在生产中是不同的,它甚至是相关的吗?
使用thin或unicorn代替WEBrick开发Rails应用程序(例如速度或其他一些功能),是否有任何真正的,有形的优势?或者这仅仅是个人偏好的问题?
我有一个Rails应用程序,我想在SharePoint 2013上部署.
为了实现某种身份验证方法,我需要WEBrick server提供服务ssl https并收听传入的https port https://localhost:3001.不幸的是,我在配置服务器方面不是很有经验.
我只找到了一些旧版Rails版本的过时教程,似乎不再适合这项工作了.
任何提示都非常感谢.
我想用SSL/HTTPS在本地开发我的Ruby on Rails应用程序,但是我在设置服务器以使用SSL时遇到了麻烦.以下是我到目前为止已经尝试过的事情:
rails server [options]该rails server命令没有附带ssl选项(rails server --help):
Usage: rails server [mongrel, thin, etc] [options]
-p, --port=port Runs Rails on the specified port.
Default: 3000
-b, --binding=ip Binds Rails to the specified ip.
Default: 0.0.0.0
-c, --config=file Use custom rackup configuration file
-d, --daemon Make server run as a Daemon.
-u, --debugger Enable the debugger
-e, --environment=name Specifies the environment to run this server under
(test/development/production).
Default: development
-P, --pid=pid Specifies the PID file. …Run Code Online (Sandbox Code Playgroud) 我目前在我的Rails应用程序中使用以下选项来启用WEBrick的HTTPS:
{
:Port => 3000,
: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("certificates/https/key.pem").read),
:SSLCertificate => OpenSSL::X509::Certificate.new(
File.open("certificates/https/cert.pem").read),
:SSLCertName => [["CN", WEBrick::Utils::getservername]]
}
Run Code Online (Sandbox Code Playgroud)
我如何指定中间证书?
我有一个rails 4应用程序,我想在webrick上使用SSL运行它.我需要做什么?
我已经为这个域和startet添加了ssl证书
bundle exec rails s -e production -p 3001 --binding = 0.0.0.0
现在我收到了这个错误:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while …Run Code Online (Sandbox Code Playgroud)