zoukankan      html  css  js  c++  java
  • SSL For Free 申请免费https SSL 凭证

    打开 SSL For Free网站(https://www.sslforfree.com) ,在输入框中填入你要申请 Let’s Encrypt 凭证的网域名称,可以用空白来分隔不同的网址,例如[subdomain.domain.com domain.com other.com](这个没试过),输入后点选右边的[Create Free SSL Certificate]继续。 
    这里写图片描述
    二、

    提供了三种验证网站的方式,此处选择使用手动的验证方式,即[Manually Verification]:点选下方的[Manually Verify Domain]继续。 
    这里写图片描述
    三、

    按照手工验证的步骤说明[Upload Verification Files]依次操作, 
    1.点击 第 步骤1 中的 Download File #1 链接下载验证文件 
    2.上传验证文件到服务器,确认步骤5中的链接能正常访问后,点击 
    [Download SSL Certificate]。 
    这里写图片描述
    四、 
    如果通过验证后,就会开始为生成所申请网站 SSL 凭证。当凭证生成后,可以看到[Get Notified of Expiration],由于申请的凭证有效期只有90天,所以可以在此设定一组 Email 和密码,即可在凭证过期前(一周左右)取得通知,以免错过延长(renew)时间。 
    这里写图片描述
    点击[Download All SSL Certificate Files]下载凭证文件压缩包,解压缩后可以看到private.key、ca_bundle.crt 和 certificate.crt 三个文件! 
    这里写图片描述

    五、修改域名配置(以nginx为例)

    • http跳转到https配置

    server { 
    listen 80; 
    server_name my.domain.com; 
    index index.html; 
    return 301 https://servernamerequest_uri
    }

    server { 
    listen 443 ssl; 
    server_name my.domain.com; 
    index index.html; 
    access_log logs/access_my_domain_com.log; 
    ssl_certificate /etc/ssl/my_domain_com/certificatet.crt;#对应压缩包里的certificatet.crt 
    ssl_certificate_key /etc/ssl/my_domain_com/private.key;#对应压缩包里的private.key 
    location / { 
    root /opt/vhosts/my_domian_com; 

    }

    • http,https同时可以访问配置

    server { 
    listen 80; 
    listen 443 ssl; 
    server_name my.domain.com; 
    index index.html; 
    ssl_certificate /etc/ssl/my_domain_com/certificatet.crt;#对应压缩包里的certificatet.crt 
    ssl_certificate_key /etc/ssl/my_domain_com/private.key;#对应压缩包里的private.key 
    access_log logs/access_my_domain_com.log; 
    location / { 
    root /opt/vhosts/my_domian_com; 

    }

    • 验证修改后的配置文件是否正确

    $ ./nginx -t -c /usr/local/nginx/conf/nginx.conf 
    the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok#验证通过 
    ./nginx -s reload #重新加载nginx配置

  • 相关阅读:
    【转载】面对酱紫的情况,肿么办哇?
    webform 基础
    LINQ 语句实现分页
    LINQ to SQL 语句
    发送邮件&Timer
    treeview递归
    进程&线程
    登录框记住账号
    窗体-对话框,记事本
    日期与地区的三级联动
  • 原文地址:https://www.cnblogs.com/aaronguo/p/8280679.html
Copyright © 2011-2022 走看看