Certbot插件,允许对cpanel中管理的名称进行acme dns-01身份验证。

certbot-dns-cpanel的Python项目详细描述


certbot dns cpanel

允许对cpanel中管理的名称进行acme dns-01身份验证的插件。对于自动为名称由cpanel管理但安装在服务器上而不是由cpanel管理的服务创建let's encrypt证书(是否通配符)很有用。

如何使用

一。安装

首先,使用pip安装certbot和插件:

pip install certbot certbot-dns-cpanel

2.配置

下载文件credentials.ini.exemple,并将其重命名为credentials.ini。编辑它以设置您的cpanel url、用户名和密码。

# The url cPanel url
# include the scheme and the port number (usually 2083 for https)
certbot_dns_cpanel:cpanel_url = https://cpanel.exemple.com:2083

# The cPanel username
certbot_dns_cpanel:cpanel_username = user

# The cPanel password
certbot_dns_cpanel:cpanel_password = hunter2

三。运行

现在,您可以使用插件运行certbot并提供凭据文件。
例如,要获取example.com和www.exemple.com的证书:

certbot certonly \
--authenticator certbot-dns-cpanel:cpanel \
--certbot-dns-cpanel:panel-credentials /path/to/credentials.ini \
-d exemple.com \
-d www.exemple.com

要创建通配符证书*.example.com并将其安装到apache服务器上,必须使用--installer选项指定安装程序插件。 如果apache插件不在系统中,则需要安装它。

pip install certbot-apache
certbot run \
--apache \
--authenticator certbot-dns-cpanel:cpanel \
--installer apache \
--certbot-dns-cpanel:cpanel-credentials /path/to/credentials.ini \
-d '*.exemple.com'

certbot文档还提供了一些有关组合authenticator和安装程序插件的附加信息:https://certbot.eff.org/docs/using.html#getting-certificates-and-choosing-plugins

码头工人

为了您的方便,我们提供了一个基于certbot/certbot的Docker图像:

docker run \
-v /path/to/credentials.ini:/tmp/credentials.ini \
badjware/certbot-dns-cpanel \
certonly \
--authenticator certbot-dns-cpanel:cpanel \
--certbot-dns-cpanel:cpanel-credentials /tmp/credentials.ini \
-d exemple.com \
-d www.exemple.com

附加文档

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用从PreparedStatement返回的RowId。getGeneratedKeys()?   selenium chrome驱动程序中下一个网站url的java空白页   java如何将参数化匿名类转换为lambda?   java JUnit在AfterClass上获取测试结果   java将动态XML/JSON内容与静态标记化负载进行比较,并检索标记值   java共享一个需要数据持久性的项目[数据库]   java在调用方法时获取意外的参数类型。getParameterTypes()   java如何用jdbc在swing中用另一个字段替换外键?   需要java Jersey Tomcat CDI依赖项解释   java如何生成UML图   java如何编写Jersey rest服务可以通过给定的spring代码访问   SpringMaven存储库管理器Nexus与Java依赖项的Artifactory   java将包从另一个项目导入eclipse中的当前项目   加密Java使用密码加密文件