• Health tips to prevent the spread of COVID-19:
    • Wash your hands frequently;
    • Maintain 2 meters social distancing;
    • Minimise outdoor activities.
    Stay safe in your bubble!

Install SSL certificate on DirectAdmin hostname using Let's Encrypt

Andy

Administrator
User ID
1
Joined
7 Jan 2019
Messages
201
Reaction score
8
Points
18
Follow the tutorial down below to enhance your DirectAdmin Login Page with Let's Encrypt SSL certificate:
Bash:
cd /usr/local/directadmin/scripts
./letsencrypt.sh request_single your.server-hostname.com 4096
The script above will also install the new cert/key/ca files in all respective global places for Apache, Dovecot, Exim, FTP, and DirectAdmin itself.
NOTE: The hostname value, eg: your.server-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 DirectAdmin and tell DirectAdmin to use the carootcert, as well as force the hostname for SSL:
Bash:
cd /usr/local/directadmin
./directadmin set ssl 1
./directadmin set carootcert /usr/local/directadmin/conf/carootcert.pem
./directadmin set ssl_redirect_host your.server-hostname.net
service directadmin restart
From now on, your DirectAdmin login page will be served in https 🔐
There you have it, all done 👍
Reference: https://help.directadmin.com/item.php?id=629
 
 Short URL:
Top