美文网首页
Nginx开通https

Nginx开通https

作者: 沐浴中的眼泪 | 来源:发表于2020-04-10 10:26 被阅读0次

1、申请证书(如腾讯云)

2、上传证书到linux目录下

3、配置nginx.conf文件

server {

        listen 443ssl;  #1.1版本后这样写

        server_name www.domain.com; #填写绑定证书的域名

        ssl_certificate 1_www.domain.com_bundle.crt;  # 指定证书的位置,绝对路径

        ssl_certificate_key 2_www.domain.com.key;  # 绝对路径,同上

        ssl_session_timeout 5m;

        ssl_protocols TLSv1 TLSv1.1TLSv1.2; #按照这个协议配置

        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置

        ssl_prefer_server_ciphers on;

        location / {

            root  html; #站点目录,绝对路径

            index  index.html index.htm;

        }

    }

4、重启nginx

./nginx -s reload

相关文章

  • Nginx开通https

    1、申请证书(如腾讯云) 2、上传证书到linux目录下 3、配置nginx.conf文件 server { ...

  • nginx - https

    1、http 重定向 [图片上传失败...(image-ca2188-1534050760876)] 2、一台主机...

  • nginx -- https

    测试配置是否有语法错误:nginx -t -c /usr/local/nginx/conf/nginx.conf输...

  • nginx https

    nginx -v nginx -V nginx -t 2.nginx.conf https配置 注意事...

  • Nginx https

    如何获得这两个材料,请查看我的文章《Apache https》,这里不在累述。

  • Nginx HTTPS

    准备工作 获取HTTP证书并上传到服务器 配置Nignx支持HTTPS协议,首先需要检查Nginx是否已经安装了S...

  • Nginx https

    要在nginx中配置https,就必须安装ssl模块,也就是: http_ssl_module进入到nginx的解...

  • 常见系统安装

    nginx 参考文件:nginx中文文档,https://www.nginx.cn/install[https:/...

  • 【Docker学习】在Docker下安装NGINX,通过upst

    【资源】 NGINX官网:https://www.nginx.com/[https://www.nginx.com...

  • Java程序分布式部署——nginx负载均衡踩坑总结

    docker nginx :https://hub.docker.com/_/nginx[https://hub....

网友评论

      本文标题:Nginx开通https

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