directadmin开启支持letsencrypt证书

1.第一步先开始sni支持

sed -i '$a enable_ssl_sni=1' /usr/local/directadmin/conf/directadmin.conf
2.添加letsencrypt支持
sed -i '$a letsencrypt=1' /usr/local/directadmin/conf/directadmin.conf
3.更新Directadmin配置
cd /usr/local/directadmin/custombuild
 ./build update
4.编辑well-known
vi /etc/httpd/conf/extra/httpd-alias.conf
添加
Alias /.well-known "/var/www/html/.well-known"
5.重启服务
service httpd restart
service directadmin restart
6.修改 user/ssl.html 模板
|*if LETSENCRYPT="1"|<br>
        <input type=radio name=request value="letsencrypt" disabled id="asa3"> <label for="asa3">使用免费 Let's Encrypt证书
        <a class='listtitle' target=_blank href="https://letsencrypt.org/">Let's Encrypt</a></label></td>
    |*endif|

然后可以正常使用Let's Encrypt证书了。系统会自动续期和更新

相关文章

发表新评论