https://lug.ustc.edu.cn/https://status.lug.ustc.edu.cn/ 即日起启用 SSL。不加密的 http URL 将自动跳转到安全的 https URL。不靠谱地推测,这可能是第一个有合法 SSL 证书的高校 LUG 主页,也可能是科大第一个有合法 SSL 证书的子域名。

由于 StartSSL 证书在 2009 年才被 M$ 承认,如果一台老爷机 2009 年以来从未更新,则可能显示证书错误。因此我们在 nginx 里做了 User-Agent 检查,仅对不是 IE 5,6,7 版本的浏览器进行跳转。因此用 curl 或 wget 是不会自动跳转到 https 的。


    if ($http_user_agent ~ "Mozilla") {
        set $test "Browser";
    }
    if ($http_user_agent ~ "MSIE (5|6|7)") {
        set $test "IE-legacy";
    }
    if ($scheme = "https") {
        set $test "secured";
    }
    if ($test = "Browser") {
        rewrite ^/(.*)$ https://$host/$1 permanent;
    }