Installing an SSL certificate for yo
来源:    发布时间: 2020-03-23 08:18   590 次浏览   大小:  16px  14px  12px
As of DA 1.50.0, we'v
As of DA 1.50.0, we've added a new feature that allows you to make use of LetsEncrypt, a tool offering free basic SSL certificates.
We've written the script in such a manner that you can also setup SSL for your hostname and all services in one simple command for your hostname: 
eg:

cd /usr/local/directadmin/scripts
./letsencrypt.sh request_single your.hostname.com 4096

which will also install the new cert/key/ca files in all respective global places for apache, dovecot, exim, ftp, and DirectAdmin.
NOTE The hostname value, eg: your.hostname.com must match the "servername" value set in the directadmin.conf, or it will not be in hostname mode, but User domain mode instead.

You must then turn on SSL in DA and tell DA to use the carootcert, as well as force the hostname for SSL:

cd /usr/local/directadmin
./directadmin set ssl 1
./directadmin set carootcert /usr/local/directadmin/conf/carootcert.pem
./directadmin set ssl_redirect_host your.hostname.com
service directadmin restart