免费证书申请地址:

https://freessl.cn/

申请步骤:

1.申请域名,

2.在云解析(阿里云域名解析  看自己申请域名的平台)配置TXT值  
3.验证域名

4.下载域名key 和 pem配置到nginx中

server {
listen 80;
server_name xxx.com;
rewrite ^ https:/$http_host$request_uri? permanent;
}

server {
listen 443 ssl;
server_name  xxx.com;

ssl_certificate cert/xxx.pem;
ssl_certificate_key cert/xxx.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;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
proxy_pass http:// xxx.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Cookie $http_cookie;
}
}

相关文章:

  • 2022-01-04
  • 2021-06-10
  • 2021-12-22
  • 2021-11-21
  • 2021-11-21
  • 2021-12-01
猜你喜欢
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2021-08-19
  • 2021-09-12
  • 2021-11-26
相关资源
相似解决方案