Rack Web Server和https:教程?

任何人都可以使用Ruby RACK网络服务器提供指向https和installint证书等设置的描述或教程的链接吗?

谢谢

Rack不是Web服务器,它是Web服务器(如Apache,nginx)和应用程序中间件之间的接口。

如果您想在SSL后面部署Rails应用程序,那么就像在Web服务器软件中设置SSL一样简单。 您可以在应用程序中执行特殊操作(例如强制登录页面始终使用SSL),但它们不在部署范围内。

例如,要使用Apache和passenger设置SSL,您只需配置vhost,就像使用SSL配置任何vhost一样:

 RailsEnv production PassengerRuby /opt/ruby-enterprise-1.8.6-20080810/bin/ruby ServerName www.domain.com SSLEngine on SSLCertificateFile /etc/certs/appname.crt SSLCertificateKeyFile /etc/private/appname.key SSLCertificateChainFile /etc/certs/CompanyIssuingCA1.crt SSLProtocol all -SSLv2 DocumentRoot /var/www/rails/appname/public/ ErrorLog /var/www/rails/ccell/log/apache.log  Options ExecCGI FollowSymLinks AddHandler cgi-script .cgi AllowOverride all Order allow,deny Allow from all   

Web服务器本身在它到达应用程序之前处理所有SSL工作。 Rails(和Rack)不需要在安全的SSL连接上运行任何特殊的东西; 你只需将用户指向https://yourdomain.com即可 。

如果您需要有关为服务器安装证书的帮助,请尝试以下链接:

  • Apache: http : //www.digicert.com/ssl-certificate-installation-apache.htm
  • nginx: http : //www.digicert.com/ssl-certificate-installation-nginx.htm