
1 Livid MOD PRO 你需要买一个证书,然后把证书配置到 Apache 或者 Nginx 上。 |
2 yinxingren Jun 18, 2014 check this: http://hzlzh.io/wordpress-ssl-https/ |
3 roychan Jun 18, 2014 买一个证书,然后直接在 Web 服务器里配置。如果有面板,比如 AMH 就方便很多了。前提是必须有独立 IP。 |
7 qq286735628 Jun 18, 2014 上StartSSL申请一年的免费SSL证书 https://www.mxgw.info/history/nginx-startssl-spdy.html |
8 Nin Jun 18, 2014 @qq286735628 这个不行,挂上StartSSL就会被墙 |
9 Jarvanh OP |
10 Jarvanh OP |
13 roychan Jun 19, 2014 @Jarvanh 先生成一个 KEY(教程网上有),然后买一个 SSL 证书(淘宝上最便宜的 7 块),得到密钥和证书后,在 AMH 里配置。AMH 有个模块叫 BBSSHIJIESSL,下载以后配置很方便。 然后这时就可以直接用 https 访问了。 看到你的博客是 WordPress,那么如果要默认 SSL 访问的话,ReWrite 规则这样写: 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; location / { index index.html index.php; if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } } 在此之前,我还加了一个规则,让非 www 域名访问 301 跳转到 www.yourdomain.com。新版本 WordPress 自带了这个功能,但我还是给一个主机绑定了两个域名并且重写规则如下: if ($host != 'youdomain.com') { rewrite ^/(.*)$ https://www.yourdomain.com/$1 permanent; } 另:最近局势紧张,建议禁用 Google 字体。 |
14 roychan Jun 19, 2014 忘记打空格了,…… |
18 Jarvanh OP |
20 Jarvanh OP 再请教一下,怎样才能让https变绿色,我的还是黄色,有些浏览器会有安全警告 |