In this tutorial we will learn how to install a SSL certificate on server hostname.
Step 1: Login to server
Login to your server via SSH.
Step 2: Find hostname
Find hostname of your DirectAdmin server using below command.
1 | hostname |
Step 3: Install SSL
In this step we will generate and install free LetsEncrypt SSL certificate on the hostname. Run below command to install LetsEncrypt SSL certificate.
In below command change your.hostname.com to your server actual hostname. We have got our server hostname in step 2 above.
1 2 | cd /usr/local/directadmin/scripts ./letsencrypt.sh request_single your.hostname.com 4096 |
Step 4: Restart
Restart DirectAdmin and Apache
1 2 | service directadmin restart service httpd restart |
Done!!
Try to access hostname with https
Try to access hostname with https