nginx强制全站https

释放双眼,带上耳机,听听看~!

nginx强制全站https

随着SSL证书的普及,使用HTTPS协议的网站越来越多,以下介绍nginx强制全站https的规则

if ($server_port = 80) {
return 301 https://$server_name$request_uri;
}
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
error_page 497 https://$server_name$request_uri;

这样将会强制使用SSL协议©

给TA打赏
共{{data.count}}人
人已打赏
技术

CentOS 7 配置静态IP

2018-3-21 14:54:56

知识资源

Windows 10纯净安装工具

2016-6-16 14:03:24

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索