相关: 使用ssl将www添加到非www地址
我正在使用一个Rails应用程序,并且有一些问题获得了某些路由的SSL的工作。 我认为我只是做一个暴力的方法,并解决这个在nginxconfiguration…涉及更less的移动部件,更确定的工作是我的想法。
例如,假设我有一个类似于“ http://mysite.com/users/sign_in ”的path。 我会强迫这样使用SSL吗?
location / { rewrite ^http://(.*)(/users/sign_in/)(.*)$ https://$1$2$3 permanent; }
任何人都可以推荐一个很好的资源在nginx中做这种https / httpredirect?
不是你的问题的答案,而是你的问题的答案:只有encryptionlogin页面几乎和不encryption任何东西一样危险。 如果安全性很重要,请encryption所有内容 – http://codebutler.com/firesheep