Install SSL certificate on hostname in DirectAdmin

Instead of using https://ipaddress:2222 you can install an SSL certificate on https://hostname:2222 and use it to log in. Below are steps to install SSL on hostname, let hostname is server.yourdomain.com

cd /usr/local/directadmin/scripts
./letsencrypt.sh request_single server.yourdomain.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: server.yourdomain.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/conf
cd /usr/local/directadmin
./directadmin set SSL 1
./directadmin set carootcert /usr/local/directadmin/conf/carootcert.pem
./directadmin set force_hostname server.yourdomain.com
./directadmin set ssl_redirect_host server.yourdomain.com
service directadmin restart
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to reinstall DirectAdmin in your web server?

Run the following commands to install: cd /usr/local/directadmin./directadmin i./directadmin p

How to install imagick with custombuild of DA?

Run the following command: cd /usr/local/directadmin/custombuild ./build update ./build...

The service ‘exim’ on server xxx is currently down

Rebuild your exim. cd /usr/local/directadmin/custombuild./build update./build set exim...

Change DA port to your choice where CSF installed

Here I will show you how to change the port from 2222 to 9999 in two steps. Step One:...

How to migrate cPanel account to DirectAdmin?

The cPanel conversion script currently only works for Admin Level restores. You must have to be...