acme免费证书
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 邮箱账号:klzy13021291933@163.com 密码:123qweasd 一、安装acme脚本 curl https: //get .acme.sh | sh DNS方式 acme.sh --issue -d *.clsn.io -d clsn.io --dns -- yes -I-know-dns-manual-mode-enough-go-ahead-please dns添加2条txt记录 第二次申请证书 acme.sh --renew -d *.clsn.io -d clsn.io --dns -- yes -I-know-dns-manual-mode-enough-go-ahead-please nginx 安装到指定目录中把证书 acme.sh --installcert -d kuailaizhiying.com \ --key- file /etc/nginx/ssl/kuailaizhiying .com.key \ --fullchain- file /etc/nginx/ssl/fullchain .cer \ --reloadcmd "service nginx force-reload" yum install epel-release -y<br>yum install nginx -y<br> server { listen 443 ssl; server_name kuailaizhiying.com; #ssl on; index index.html index.htm; ssl_certificate /etc/nginx/ssl/fullchain .cer; ssl_certificate_key /etc/nginx/ssl/kuailaizhiying .com.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 /usr/share/nginx/html ; index index.html index.htm; } }<br><br>参看<br>https: //www .cnblogs.com /clsn/p/10040334 .html |
# For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation: http://nginx.org/ru/docs/ user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 4096; include /etc/nginx/mime.types; default_type application/octet-stream; # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; server { listen 80; listen [::]:80; server_name www.kuailaizhiying.com; root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; error_page 404 /404.html; location = /404.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } # Settings for a TLS enabled server. # server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name www.kuailaizhiying.com; root /usr/share/nginx/html; #ssl_certificate "/etc/pki/ng/server.crt"; #ssl_certificate_key "/etc/pki/nginx/private/server.key"; ssl_certificate /etc/nginx/ssl/fullchain.cer; ssl_certificate_key /etc/nginx/ssl/kuailaizhiying.com.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } }
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构