Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/logver.com/wp-includes/post-template.php on line 284

Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/logver.com/wp-includes/post-template.php on line 284

nginx强制全站https

ssl

随着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协议©

人已赞赏
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧