请教阿里云的 SLB 和 SSL 的配置问题

2018-12-11 20:21:10 +08:00
 Liang

各种 Google 找不到答案,无奈只好请教一下大家。

先交代一下背景:

现象重现:

$ curl -I https://test.com/abc

HTTP/1.1 301 Moved Permanently
Date: Tue, 11 Dec 2018 11:48:50 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: http://test.com:443/abc/

slb 配置

http[80] => http[80]
https[443] => http[443]

nginx 配置

server {
    listen 80;
    server_name test.com;
    return 301 https://test.com$request_uri;
}

server {
    listen 443 ssl;
    server_name test.com;

    ssl on;
    ssl_certificate /etc/ssl/test.com.crt;
    ssl_certificate_key /ect/ssl/test.com.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;

    index index.html;
    root /data/web/test.com;
}
1356 次点击
所在节点    程序员
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/516646

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX