zoukankan      html  css  js  c++  java
  • linux免费https证书申请教程

    linux免费https证书申请教程
    直接去阿里云 菜单有个证书服务
    进去有个购买证书菜单 选择免费的 然后会提示写个人资料 然后系统生成csr 然后提交审核
    这个时候会有份邮件 文件下载上传到你的服务器 验证 (因为我用的是文件验证方式)

    审核通过后 阿里云后台证书服务 里可以下载证书啦
    解压上传到nginx目录conf mkdir cert 证书文件上传上去 如图下

    <img src="http://newmiracle.cn/wp-content/uploads/2017/01/QQ截图20170112135059-300x94.png" alt="QQ截图20170112135059" width="300" height="94" class="alignnone size-medium wp-image-1007" />

    接下来改nginx.conf配置
    添加个443端口 因为https是443端口 然后证书路径改下就Ok nginx -s reload重启
    <pre>
    server {
    listen 443;
    server_name www.newmiracle.cn newmiracle.cn;
    ssl on;
    charset utf-8;

    index index.html index.htm;
    ssl_certificate cert/213996993440360.pem;
    ssl_certificate_key cert/213996993440360.key;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    location / {
    root /home/www/wordpress;
    index index.php index.html index.htm;
    }
    location ~ .php$ {
    root /home/www/wordpress;
    #fastcgi_pass 127.0.0.1:9000;
    #fastcgi_pass 127.0.0.1:9001;
    fastcgi_pass unix:/dev/shm/php-cgi.sock;
    fastcgi_index index.php;
    #try_files $uri =404;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }

    }
    </pre>
    然后https://newmiracle.cn可以访问啦 ps:如果访问是直接下载 那过几个小时看看吧 可能没更新

  • 相关阅读:
    Django项目:CMDB(服务器硬件资产自动采集系统)--01--01CMDB获取服务器基本信息
    rabbitmq 实现多个消费队列
    mssql附加的数据库查询的时候没有搜索权限
    mvc 返回json格式时间格式化
    HighChat动态绑定数据 数据后台绑定(四)
    双向绑定
    v-bind 属性绑定
    v-on 事件触发
    v-text和v-html绑定数据显示
    插值表达式
  • 原文地址:https://www.cnblogs.com/newmiracle/p/11872607.html
Copyright © 2011-2022 走看看