Sha256: 3f8b936ee29eb8e4ebd5e964fe37663c8bcc69acb2a3879b702fdf90058eb856
Contents?: true
Size: 1.42 KB
Versions: 7
Compression:
Stored size: 1.42 KB
Contents
#!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. # This is a template of the 'script/rails' file for starting Webrick, # for Mongrel, use Apache or Ngnix as the SSH handler. # #QW - add SSL Support for Webrick require 'rubygems' require 'rails/commands/server' require 'rack' require 'webrick' require 'webrick/https' module Rails class Server < ::Rack::Server def default_options super.merge({ :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("lib/certs/server.key").read), :SSLCertificate => OpenSSL::X509::Certificate.new( File.open("lib/certs/server.crt").read), :SSLCertName => [["CN", WEBrick::Utils::getservername]] }) end end end #QW - End add SSL support APP_PATH = File.expand_path('../../config/application', __FILE__) require File.expand_path('../../config/boot', __FILE__) require 'rails/commands'
Version data entries
7 entries across 7 versions & 1 rubygems