美文网首页
nginx HTTPS 配置

nginx HTTPS 配置

作者: 其其小宝 | 来源:发表于2023-01-08 09:23 被阅读0次
upstream strapi{
  server 127.0.0.1:1337;
}

server {
  listen 4433 ssl;
  server_name  www.**.com; # 修改成自己的域名;
  server_tokens off; ## Don't show the nginx version number, a security best practice
  #证书文件名称
  ssl_certificate /etc/nginx/cert/9040547_.net.cn.pem;
  #私钥文件名称
  ssl_certificate_key /etc/nginx/cert/9040547_.net.cn.key;
  ssl_session_timeout 5m;
  #请按照以下协议配置
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  #请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
  ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
  ssl_prefer_server_ciphers on;
  access_log  /var/log/nginx/access.log; # 根据实际情况修改 
  error_log   /var/log/nginx/error.log; # 根据实际情况修改 
    
   location / {
        client_max_body_size 0;
    gzip off;

    proxy_read_timeout      300;
    proxy_connect_timeout   300;

     proxy_redirect          off;

    proxy_http_version 1.1;

    proxy_set_header    Host                $http_host;
    proxy_set_header    X-Real-IP           $remote_addr;
    proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
    proxy_set_header    X-Forwarded-Proto   $scheme;
    proxy_pass http://strapi;
    }
    #/etc/nginx/txt/
    location /9173747642.txt {
        alias /etc/nginx/txt/9173747642.txt;
    }
 

}

相关文章

  • # nginx https证书配置

    nginx https证书配置 一 前言 此文档针对于nginx配置反向代理使用https证书方法 nginx作为...

  • nginx https 配置

    nginx https 配置

  • nginx配置https

    nginx配置https https需要的证书我们已经申请到了,下面分享下nginx配置https的一些配置参数!...

  • Nginx配置https请求,以及Nginx+keepalive

    一、Nginx配置https请求 要实现Nginx配置https请求,安装的时候需要加上 --with-http_...

  • nginx配置https

    只配置443会导致http和https共存,只要再80里配置个重定向即可return 301 https://$s...

  • nginx https配置

    本地文件上传到服务器

  • Nginx https 配置

    准备环境阿里云 腾讯云部署好站点,且使用DNS解析到云服务器的IP地址 接下来就是配置HTTPS的关键步...

  • Nginx配置HTTPS

  • Nginx 配置 https

    从云服务提供商处申请证书 申请 https 证书教程-百度经验 申请下来的证书目录结构 下文中只拿 Nginx 来...

  • NGINX 配置 HTTPS

    首先是下载证书,我的是再阿里云里面,如果购买成功了,直接下载证书。里面会有两后缀分别为.key和.pem的个文件,...

网友评论

      本文标题:nginx HTTPS 配置

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