[转帖]acme How to issue a cert

acme,how,to,issue,cert · 浏览次数 : 0

小编点评

## Generating a Certificate with Acme.sh This document provides instructions on how to use the `acme.sh` command-line tool to generate a certificate for a single domain or multiple domains. ### Prerequisites * Install `acme.sh` from the official repository: `git clone -r acme.sh` * Make sure you have basic command-line knowledge. ### Single Domain Mode 1. Point the domain name and its subdomain to the same web root folder: ``` acme.sh --issue -d example.com -w /home/wwwroot/example.com ``` 2. This mode requires write access only to the web root folder. ### Standalone Mode 1. Run the command with the `--standalone` flag: ``` acme.sh --issue -d example.com --standalone ``` 2. This mode allows you to issue the certificate without needing a web server. ### TLS Alpn Mode 1. Ensure your web server supports TLS/SSL by setting the `--tlsport` flag. 2. Use the `--alpn` flag to specify the desired port for TLS/SSL. 3. Example: ``` acme.sh --issue -d example.com --alpn --tlsport 84434 ``` ### DNS API Mode 1. Set the `--dns` flag followed by the subdomain names. 2. Use the `--dns_cf` or `--dns_ns` flag for CloudFlare and Namecheap respectively. 3. Example: ``` acme.sh --issue -d example.com --dns dns_cf ``` ### DNS Manual Mode 1. Use the `--dns` flag followed by the subdomain name. 2. Use the `--nginx` flag to specify the nginx configuration file path. 3. Example: ``` acme.sh --issue -d example.com --dns dns_manual ``` ### Apache Mode 1. Use the `--issue` flag followed by the domain name. 2. Use the `--nginx` flag to specify the nginx configuration file path. 3. Example: ``` acme.sh --issue -d example.com --nginx /etc/nginx/conf.d/example.com.conf ``` ### Nginx Mode 1. Use the `--issue` flag followed by the domain name. 2. Use the `--nginx` flag to specify the nginx configuration file path. 3. Example: ``` acme.sh --issue -d example.com --nginx /etc/nginx/nginx.conf ```

正文

https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert

 

1. Single domain:

1) Webroot mode:

If you already have a web server running, you should use webroot mode. you only need write access to the web root folder.

acme.sh  --issue  -d example.com  -w /home/wwwroot/example.com

2) Standalone mode:

If you don't have a web server, maybe you are on a smtp or ftp server, the 80 port is free. you can use standalone mode. acme.sh has a builtin standalone webserver, it can listen at 80 port to issue the cert.

acme.sh  --issue  -d example.com  --standalone

If you are using a non-standard 80 port behind a reverse proxy or load balancer , you can use --httpport to specify your port:

acme.sh  --issue  -d example.com  --standalone --httpport 88

3) Standalone tls alpn mode:

If you don't have a web server, maybe you are on a smtp or ftp server, the 443 port is free. you can use standalone tls alpn mode. acme.sh has a builtin standalone tls webserver, it can listen at 443 port to issue the cert.

acme.sh  --issue  -d example.com  --alpn

If you are using a non-standard 443 port behind a reverse proxy or load balancer , you can use --tlsport to specify your port:

acme.sh  --issue  -d example.com  --alpn --tlsport 8443

4) DNS API mode:

Yes, if your nameservice provider has an api, we can use the api to automatically add the txt record for you. your cert will be automatically issued and renewed.

Cloudflare api:

export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"

export CF_Email="xxxx@sss.com"

acme.sh  --issue  -d example.com  --dns dns_cf

How to use dns api: https://github.com/acmesh-official/acme.sh/wiki/dnsapi

5) DNS manual mode:

See: https://github.com/acmesh-official/acme.sh/wiki/DNS-manual-mode

6) DNS alias mode:

See: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode

7) Apache mode:

If your website is running apache server, acme.sh can use apache server to issue cert. And acme.sh will restore your apache conf after the cert is issued, don't worry.

acme.sh  --issue  -d example.com  --apache

8) Nginx mode:

If your website is running nginx server, acme.sh can use nginx server to issue cert. And acme.sh will restore your nginx conf after the cert is issued, don't worry.

acme.sh  --issue  -d example.com  --nginx

Sometimes, nginx conf file can not be found automatically, you can specify one:

acme.sh  --issue  -d example.com  --nginx /etc/nginx/nginx.conf

You can also specify the website conf:

acme.sh  --issue  -d example.com  --nginx /etc/nginx/conf.d/example.com.conf

2. Multiple domains, SAN mode

Issue a single cert including multiple domains. All the domains use the same validation method:

1) Webroot mode:

You must point example.com and www.example.com to the same web root folder /home/wwwroot/example.com

acme.sh  --issue  -d example.com  -w /home/wwwroot/example.com   -d www.example.com

2) Standalone mode:

acme.sh  --issue  -d example.com  --standalone  -d www.example.com 

3) Dns api mode:

Cloud flare api:

export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"

export CF_Email="xxxx@example.com"

acme.sh  --issue  -d example.com  --dns dns_cf  -d www.example.com

4) Dns manual mode:

acme.sh  --issue  -d example.com  --dns  -d www.example.com

3. Multiple domains, SAN mode, Hybrid mode

Issue a single cert including multiple domains. Each domain uses a different validation method.

acme.sh  --issue  \
-d aa.com  -w /home/wwwroot/aa.com \
-d bb.com  --dns dns_cf \
-d cc.com  --apache \
-d dd.com  -w /home/wwwroot/dd.com
acme.sh  --issue  \
-d aa.com  --dns dns_dp \
-d bb.com  --dns dns_cf \
-d cc.com  --dns dns_ns 

与[转帖]acme How to issue a cert相似的内容:

[转帖]acme How to issue a cert

https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert 1. Single domain: 1) Webroot mode: If you already have a web server running, you s

[转帖]acme.sh-实现自动化部署SSL证书

https://cloud.tencent.com/developer/article/2055254 前言 ; acme 我一直使用的都是Let's Encrypt免费的证书,昨天看到群里的大佬发出了一个测试的证书申请的脚本命令,我才接触到acme.sh,于是我查阅了很多大佬的博文了解这个脚本的使

[转帖]acme 中文说明

https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E acme.sh 实现了 acme 协议, 可以从 letsencrypt 生成免费的证书. 主要步骤: 安装 acme.sh 生成证书 copy 证书到 nginx/

[转帖]通过acme 协议生成免费的证书.

https://zhuanlan.zhihu.com/p/377191119 Authentication Credential Management Extension 环境介绍: 服务器:阿里云 DNS解析: dnspod 操作过程如下:(以下操作过程建议在root下执行) 1.下载脚本并执行安

[转帖]

Linux ubuntu20.04 网络配置(图文教程) 因为我是刚装好的最小系统,所以很多东西都没有,在开始配置之前需要做下准备 环境准备 系统:ubuntu20.04网卡:双网卡 网卡一:供连接互联网使用网卡二:供连接内网使用(看情况,如果一张网卡足够,没必要做第二张网卡) 工具: net-to

[转帖]

https://cloud.tencent.com/developer/article/2168105?areaSource=104001.13&traceId=zcVNsKTUApF9rNJSkcCbB 前言 Redis作为高性能的内存数据库,在大数据量的情况下也会遇到性能瓶颈,日常开发中只有时刻

[转帖]ISV 、OSV、 SIG 概念

ISV 、OSV、 SIG 概念 2022-10-14 12:29530原创大杂烩 本文链接:https://www.cndba.cn/dave/article/108699 1. ISV: Independent Software Vendors “独立软件开发商”,特指专门从事软件的开发、生产、

[转帖]Redis 7 参数 修改 说明

2022-06-16 14:491800原创Redis 本文链接:https://www.cndba.cn/dave/article/108066 在之前的博客我们介绍了Redis 7 的安装和配置,如下: Linux 7.8 平台 Redis 7 安装并配置开机自启动 操作手册https://ww

[转帖]HTTPS中间人攻击原理

https://www.zhihu.com/people/bei-ji-85/posts 背景 前一段时间,公司北京地区上线了一个HTTPS防火墙,用来监听HTTPS流量。防火墙上线之前,邮件通知给管理层,我从我老大那里听说这个事情的时候,说这个有风险,然后意外地发现,很多人原来都不知道HTTPS防

[转帖]关于字节序(大小端)的一点想法

https://www.zhihu.com/people/bei-ji-85/posts 今天在一个技术群里有人问起来了,当时有一些讨论(不完全都是我个人的观点),整理一下: 为什么网络字节序(多数情况下)是大端? 早年设备的缓存很小,先接收高字节能快速的判断报文信息:包长度(需要准备多大缓存)、地