DirectAdmin啟用Let's Encrypte
從1.50.0版本開始, DirectAdmin 開始支持 Let's Encrypte ,鼠標(biāo)點(diǎn)點(diǎn)就可以創(chuàng)建免費(fèi)的證書,下面是DirectAdmin啟用Let's Encrypte的教程。
1.進(jìn)入/usr/local/directadmin/conf/,修改directadmin.conf,添加:
letsencrypt=1
enable_ssl_sni=1
對(duì)絕大部分的用戶來說,需要添加enable_ssl_sni=1,如果你有獨(dú)立IP,那可以不用添加。
2.進(jìn)入/usr/local/directadmin/custombuild目錄,運(yùn)行:
./build update
./build rewrite_confs
3.進(jìn)入/etc/httpd/conf/extra/目錄,編輯httpd-alias.conf,加入:
Alias /.well-known "/var/www/html/.well-known"
正常配置如下:
Alias /.well-known/acme-challenge /var/www/html/.well-known/acme-challenge
Alias /config /var/www/html/redirect.php
Alias /roundcube /var/www/html/roundcube
Alias /webmail /var/www/html/roundcube
Alias /phpMyAdmin /var/www/html/phpMyAdmin
Alias /phpmyadmin /var/www/html/phpMyAdmin
Alias /pma /var/www/html/phpMyAdmin
4.重啟Apache和DirectAdmin服務(wù)。
service httpd restart
service directadmin restart
當(dāng)然了,不要一直試著去申請(qǐng)證書,看上面截圖的最后一行字,每周只能請(qǐng)求20次,一個(gè)域名也不能在短時(shí)間內(nèi)多次請(qǐng)求證書。