美文网首页
Nginx搭建https

Nginx搭建https

作者: 杨肆月 | 来源:发表于2019-04-11 17:16 被阅读0次

参考:
https://juejin.im/post/590ec765a22b9d0058fcfaa5
https://www.cnblogs.com/yjmyzz/p/openssl-tutorial.html

键入命令:

cd /usr/local/nginx/conf
//下面要填密码和一堆信息
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl req -new -x509 -key server.key -out ca.crt -days 3650

在nginx配置文件里配置:

server {
            listen  80;
            listen  443 ssl;

            ssl_certificate  /usr/local/nginx/conf/ca.crt;
            ssl_certificate_key  /usr/local/nginx/conf/server.key;

    }

重启nginx生效

相关文章

  • Nginx搭建https

    参考:https://juejin.im/post/590ec765a22b9d0058fcfaa5https:/...

  • 搭建Nginx Https

    Certbot Https生成证书后需要CA认证。未认证的搭建好后,浏览器会首先出现此网站不安全提示,选择继续访问...

  • Nginx搭建https网站

    1.在下面网站申请免费证书https://certmall.trustauth.cn/Free填写信息,生成私钥2...

  • nginx搭建https环境

    1、首先nginx必须支持ssl模块 ./configure --prefix=/usr/local/nginx ...

  • nginx

    node 使用 nginx 反向代理搭建https服务 使用自己生成的证书 nginx http配置 编辑ngin...

  • [Nginx]04 - 搭建https服务

    生成私钥和证书 在nginx根目录创建certs文件夹,在文件夹中打开git bash,因为需要使用oepnssl...

  • Nginx环境下搭建HTTPS

    本服务器使用的环境是nginx,系统是Ubuntu,使用的阿里云的服务器,所以在阿里云中下载证书。 当然你还可以去...

  • 阿里云https+nginx服务搭建

    原文地址:阿里云https+nginx服务搭建 本文不会介绍https相关知识,只是把我创建https服务的过程分...

  • 关于nginx的https环境搭建

    https://common-buy.aliyun.com/?spm=5176.7968328.1120760.1...

  • nginx搭建https服务器

    http默然端口:80https默然端口:443 ubuntu 写shell用 #!/bin/bashcentos...

网友评论

      本文标题:Nginx搭建https

      本文链接:https://www.haomeiwen.com/subject/prrxwqtx.html