使用我们对WordPress项目加密SSL


什么让我们加密?

多年来,购买,更新,安装和管理SSL证书使我不知所措,而且费用高昂且复杂。 现在, 让我们加密使它变得相当简单和免费。

Let's Encrypt是一家新兴的,免费,自动化和开放式证书颁发机构,由一家名为Internet Security Research Group的加利福尼亚公益组织提供给您-它也具有非营利地位。

其目标是使HTTPS成为默认的Internet浏览器协议,以确保Web上更高的隐私性和安全性。 Mozilla和电子前沿基金会是其白金赞助商中的两个:

Whats Lets Encrypt Platinum赞助商

让我们加密在12月进入公开测试版,现在我可以轻松地指导您浏览其服务。

在本教程中,我将引导您在我的一些网站上安装“让我们加密”,包括我的WordPress咨询网站http://lookahead.io (即将成为https://)。

在开始之前,请记住,我确实会尝试参加以下讨论。 如果您有任何问题或建议,请在下面发表评论,或通过Twitter @reifman与我联系

让我们加密功能摘要

让我们在与Apache一起使用的Python上运行Encrypt可以自动进行证书注册和续订,从而简化了为任何网站(包括WordPress)激活HTTPS功能的过程。

以下是“让我们加密”所带来的主要好处:

  • 免费:拥有域名的任何人都可以免费注册受信任的证书。
  • 自动: Apache Web服务器可以轻松获取证书,对其进行安全配置并自动管理续订。
  • 安全: Let's Encrypt将通过证书颁发机构和帮助站点维护安全服务器来推进TLS安全最佳实践。
  • 透明:所有证书交易均已公开记录并可供检查。
  • 开放:自动发行和更新协议将作为开放标准发布。
  • 合作社:让我们加密是一个使所有人受益的社区努力。

让我们加密安装SSL

首先更新服务器Apache Ubuntu。

sudo apt-get update

如果您的服务器上未安装Git,则最好安装它来安装Let's Encrypt:

sudo apt-get install git

安装后,将Let's Encrypt软件克隆到第三方应用程序的Apache opt子目录中:

sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt

首先,我尝试在Fever新闻阅读器应用程序而非WordPress上安装Let's Encrypt。 我将其托管在http://fever.lookahead.io

cd /opt/letsencrypt
./letsencrypt-auto --apache -d fever.lookahead.io

安装向导

首先,系统会要求您提供电子邮件地址:

让我们加密安装电子邮件请求

然后显示服务条款:

让我们加密安装服务条款

让我们加密让您选择提供HTTPS作为辅助选项,或将所有流量定向到HTTPS:

让加密选择HTTPS模式

几分钟即可完成:

让我们加密祝贺

您还将看到有关证书到期和续签的一些注意事项:

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/lookahead.io/fullchain.pem. Your cert will
   expire on 2016-05-03. To obtain a new version of the certificate in
   the future, simply run Let's Encrypt again.
 - Your account credentials have been saved in your Let's Encrypt
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Let's
   Encrypt so making regular backups of this folder is ideal.
 - If you like Let's Encrypt, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

在WordPress上安装

要在我的WordPress咨询站点上安装“让我们加密SSL”,就很简单。 仅有一个细微的差别。 我要求我们加密也支持www子域:

cd /opt/letsencrypt
./letsencrypt-auto --apache -d lookahead.io -d www.lookahead.io

您现在可以通过HTTP或HTTPS访问它,您将在这里结束, https : //lookahead.io

让我们加密先行咨询

SSL报告

您可以访问Qualys SSL Labs之类的网站,以获得有关SSL功能的网站报告:

https://www.ssllabs.com/ssltest/analyze.html?d=fever.lookahead.io

让我们对SSL Qualys Labs进行加密

这是身份验证页面:

让我们加密SSL Qualys Labs身份验证

证书自动续订

自动续订也非常简单。 首先,我们获取续订脚本并赋予其执行特权:

sudo curl -L -o /usr/local/sbin/le-renew http://do.co/le-renew
sudo chmod +x /usr/local/sbin/le-renew
让我们加密设置自动续订

然后为每个域运行脚本:

sudo le-renew lookahead.io
Checking expiration date for fever.lookahead.io...
The certificate is up to date, no need for renewal (89 days left).

您可以设置一个cron作业以使其定期运行:

crontab -e

添加此行:

30 2 * * 1 /usr/local/sbin/le-renew lookahead.io >> /var/log/le-renew.log

故障排除

我确实遇到了一些我认为应该分享的怪癖。 当我为旧的Community Starter开源项目(根域和www)安装SSL时,Let's Encrypted出现此错误:

We were unable to find a vhost with a ServerName or Address of 
    │ www.communitystarter.org.
    │ Which virtual host would you like to choose?

我在conf文件中设置了通配符别名:

<VirtualHost *:80>
        ServerName communitystarter.org
        ServerAlias *.communitystarter.org
        DocumentRoot /var/www/communitystarter/

此更改已修复,并为www保留添加了别名:

<VirtualHost *:80>
        ServerName communitystarter.org
        ServerAlias www.communitystarter.org
        ServerAlias *.communitystarter.org
        DocumentRoot /var/www/communitystarter/

然后主页嵌入的Vimeo视频失败:

让Encrypt Vimeo无法与HTTPS一起使用

我只需要将iframe更改为Vimeo播放器即可使用HTTPS:

<!-- ***************** - START Video - ***************** -->
<div class="video-wrap video_left">
<div class="video-main">
<div class="video-frame">
<iframe src="https://player.vimeo.com/video/37639283" title="introduction to newscloud's community starter" scrolling="no" width="572" height="312" frameborder="0" marginheight="0"></iframe>
</div><!-- end video-frame -->
</div><!-- end video-main -->
<div class="video-sub">
<h2>NewsCloud's Community Starter</h2>
 <p>Community Starter is a simple, affordable platform to launch social media communities and extend existing websites. It provides a suite of Facebook-connected interactive features that can help you host a vibrant online community for your neighborhood, topic, community group, nonprofit, membership association or city.</p>
<a href="/how-community-foundations-can-build-engaged-local-communities-with-newscloud.html" class="ka_button small_button small_tealgrey"><span>Start your community →</span></a><br class="clear" />
</div><!-- end video-sub -->
</div><!-- end video-wrap -->
<!-- ***************** - END Video - ***************** -->

问题解决了:

让Encrypt Vimeo使用HTTPS

收盘时

我对社区目标“让我们的加密”轻松便捷地实现印象深刻。 各地的Web发布者都将从简单,免费的SSL中受益。 谢谢EFF,Mozilla和让我们加密!

让加密捐赠

您可以捐赠给我们加密或EFF支持这项工作:

您可以在此处了解有关其软件的更多技术细节 。 让我们加密还有一个结构良好的社区论坛

让我们加密社区论坛

下一步是什么?

让我们加密正在积极完成其第一个公开发行版:

在我们完全放弃beta标签之前,我们还有很多工作要做,尤其是在客户体验方面。 自动化是我们战略的基石,我们需要确保客户端在各种平台上都能平稳可靠地工作。

为了跟上最新代码,只需偶尔更新您的git树:

cd /opt/letsencrypt
sudo git pull

我的主要WordPress网站当前与Varnish 3.x一起运行。 使用“加密”功能无法立即使用。 我可能会花一些时间很快找到解决方案。

同时,如果您正在寻找其他实用程序来帮助您构建不断增长的WordPress工具集或用于研究代码并精通WordPress的代码,请别忘了看看Envato中提供的功能市场

如有疑问,请在下面发布。 或者,您可以通过Twitter @reifman与我联系 。 请查看我的Envato Tuts +讲师页面,以查看我编写的其他教程,例如在Linux中(在90秒内)克隆WordPress

相关链接

翻译自: https://code.tutsplus.com/tutorials/using-lets-encrypt-ssl-with-your-wordpress-project--cms-22303

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1.1版修正了1.0版在WordPress 3.0.1 出现 “您没有足够的权限访问这个页面” 的问题,请各位用户及时更新。 名称:Post Encryption And Decryption 版本: 1.1 作者:Ludou 更新:2010-05-17 功能:帮助您快速加密解密某个分类或某个标签下的所有的文章。加密为给你的文章添加密码,其他人必须知道密码才能阅读你加密的文章。解密为加密的逆过程,去除文章的密码,任何人均可阅读你的文章。 性能:本插件只会按照您的要求更改对应文章的密码信息,不会更改您博客上的其他数据。 下载:WordPress官方下载 安装方法: 下载插件,解压缩,你将会看到一个文件夹post-batch-encryption,然后将其放置到插件目录下,插件目录通常是 `wp-content/plugins/` 在后台对应的插件管理页激活该插件Post Encryption And Decryption 现在您可在管理后台 设置 -> Post Encryption And Decryption 进行文章的加密和解密 完成 说明: 加密更新成功后,在WordPress后台 – 文章,可以看到对应文章标题后面添加了“密码保护”字样. Plugin name: Post Encryption And Decryption Version:1.0 Author: Ludou Update: 2010-05-17 Description: Post Encryption And Decryption is an plugin designed to help you quickly encrypt or decrypt all posts of specific category or tag. Download: From WordPress Installation: Upload to your plugins folder, usually `wp-content/plugins/` and unzip the file, it will create a `wp-content/plugins/post-batch-encryption/` directory. Activate the plugin on the plugin screen. Go to Settings -> Post Encryption And Decryption Now you can encrypt or decrypt all posts of specific category or tag Done FAQ: 1. Will the plugin delete my data in the database? No! This plugin justs change the password of posts you choose.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值