Linux脚本申请证书
来源:互联网 发布:每天一杯速溶咖啡 知乎 编辑:程序博客网 时间:2024/05/22 11:18
1、下载文件
wget https://raw.githubusercontent.com/xdtianyu/scripts/master/lets-encrypt/letsencrypt.sh
wget https://raw.githubusercontent.com/xdtianyu/scripts/master/lets-encrypt/letsencrypt.conf
2、授权
chmod +x letsencrypt.sh
3、下载插件
yum install python-argparse
4、运行
./letsencrypt.sh letsencrypt.conf
wget https://raw.githubusercontent.com/xdtianyu/scripts/master/lets-encrypt/letsencrypt.sh
wget https://raw.githubusercontent.com/xdtianyu/scripts/master/lets-encrypt/letsencrypt.conf
2、授权
chmod +x letsencrypt.sh
3、下载插件
yum install python-argparse
4、运行
./letsencrypt.sh letsencrypt.conf
login.xiaomilaile.com/.well-known/acme-challenge9AVVF3uwWfpiq7CQtkpCG5SeMApVVPG3KNkBdaQ871A
大神写的脚本:
http://www.111cn.net/sys/linux/103559.htm
就是有个域名验证的问题
他会生成一个文件 然后会去访问 需要访问到这个文件就算域名验证成功 你看那个网址上有说明的
就这样做就可以申请到let's encrypt证书,也不用通过网站申请
一般会以这么个结尾来访问生成的验证域名文件
参考Nginx配置
server { listen 443 ssl; server_name heqf.com; # ssl_certificate /data/nginx/conf/1_www.heqf.com_bundle.crt; #ssl_certificate_key /data/nginx/conf/2_www.heqf.com_bundle.key; ssl_certificate /opt/letsencrypt/example.chained.crt; ssl_certificate_key /opt/letsencrypt/example.com.key; location / { root /data/nginx/html/heqfweb1_0; index login.html; } location /local-command { proxy_pass http://11.11.11.11:8011/command; } location /local-getUrl { proxy_pass http://11.11.11.11:8011/getUrl; }location /local-interface { proxy_pass http://11.11.11.11:8011/interface; }location ^~ /uap-html/ { proxy_pass http://user.heqf.com/;} location /uap-interface { proxy_pass http://user.heqf.com:8091/interface; }location /msg-a201 { proxy_pass http://heqf.com; }location /msg-a202 { proxy_pass http://heqf.com; }location /msg-a101 { proxy_pass http://11.11.11.11; }location /msg-a102 { proxy_pass http://11.11.11.11; }location ^~ /aliyun/ { proxy_pass http://heqf.img-cn-beijing.aliyuncs.com/; } location ^~ /file-view { proxy_pass http://11.11.11.11:3300/upload_url; } location ^~ /.well-known/acme-challenge/{ proxy_pass http://heqf.com:9099/.well-known/acme-challenge/; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }
server { listen 80; server_name localhost;rewrite ^(.*)$ https://$host$1 permanent; #charset koi8-r; charset utf-8; #access_log logs/host.access.log main; location / { root /data/nginx/html/heqf1_0; # index index.html index.htm; index login.html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }location ^~ /.well-known/acme-challenge/{ proxy_pass http://heqf.com:9099/.well-known/acme-challenge/; } }
1 0
- Linux脚本申请证书
- linux免费证书申请教程
- 申请证书
- 开发者证书申请方法
- NOKAI测试证书申请
- OCP证书申请
- 开发者证书申请流程
- iphone 申请证书
- IDP证书申请流程
- iPhone开发 证书申请
- 证书申请CSR文件
- 申请iOS开发者证书
- SSL证书申请流程
- SSL证书申请
- iOS证书申请过程
- 开发证书申请
- iOS申请证书
- IOS申请发布证书
- uboot下函数run_main_loop分析
- jQuery选择器之层级选择器
- Git rebase和 Git merge的区别
- 单例模式
- 求带环单链表的入口点
- Linux脚本申请证书
- Android Studio 打包时 Signature Version V1 V2
- 微信公众号项目笔记 二
- jQuery中的Sizzle引擎分析
- success
- C++学习过程重点问题记录
- 第九、Java数组的常见操作(冒泡、选择排序、数组翻转)
- ACM习题L-12
- struts 1