您的位置:首页 > 理论基础 > 计算机网络

nginx服务器http重定向到https的正确写法

2017-02-24 11:49 681 查看
参考文章:https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#taxing-rewrites

最新的写法:

server {
listen 80;
server_name xxx.abc.com;
return 301 https://$server_name$request_uri; }
server {
listen    443;
server_name    xxx.abc.com;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: