certbot常用命令
时间: 2024-06-27 18:00:37 浏览: 6
Certbot 是一个自动化工具,用于获取和管理 Let's Encrypt(LE)免费 SSL/TLS 证书。它与 Apache、Nginx 等 Web 服务器集成,简化了证书的安装过程。以下是一些常用的 Certbot 命令:
1. **certbot**: 这是基本命令,用于启动证书获取流程。例如:
```
certbot certonly --webroot-path=/var/www/html -d example.com
```
这会使用 webroot 方法尝试获取 `example.com` 的证书。
2. **certbot renew**: 定期检查并自动更新即将过期的证书。
```
certbot renew
```
3. **certbot --nginx**: 针对 Nginx 服务器的特定配置。
```
certbot --nginx -d example.com
```
4. **certbot rollback**: 如果证书安装失败,可以回滚到未安装状态。
```
certbot rollback
```
5. **certbot certificates**: 显示已安装的证书详细信息。
```
certbot certificates
```
6. **certbot --apache**: 针对 Apache 服务器的配置。
```
certbot --apache -d example.com
```
7. **certbot revoke**: 单独撤销某个证书。
```
certbot revoke --cert /etc/letsencrypt/live/example.com/cert.pem
```
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)