我試圖在子域上實現https。我已經包括SSL_requriment插件Ruby on Rails的HTTPS實現
我的應用程序控制器有兩種說法:
include SslRequirement
ssl_required if ENV["RAILS_ENV"] == "production"
我已經生成的密鑰,CSR與CRT和Apache的配置文件中指定的:
<VirtualHost *:80>
ServerName app.my_app.com
DocumentRoot /home/me/my_app/production/current/public
</VirtualHost>
<VirtualHost *:443>
ServerName app.my_app.com
DocumentRoot /home/me/my_app/production/current/public
SSLEngine on
SSLCertificateFile /home/me/my_app/production/shared/plusrev.crt
SSLCertificateKeyFile /home/me/my_app/production/shared/plusrev.key
</VirtualHost>
不過我的子域是不重定向到https。任何我想念的東西。
請檢查我的答案:) – 2012-04-11 09:41:06