We have been using DirectAdmin a CharlesWorks since July of 2013. It has been extremely dependable. Support for it is great as well.
This short article applies to web hosting servers using DirectAdmin’s control panel. This function is especially helpful when restoring a large number of sites from backups. Examples would be server rebuilds or mass moving sites from server to server. However, in the case of the latter, you should ensure all sites being migrated had their DNS repointed to (or handled by) the destination server.
On CharlesWorks web servers, for example, we handle DNS, email and websites on completely separate servers. This is great for reducing loads on each type of server. If your infrastructure is set up like ours, I believe it would be best to:
- Migrate a copy of all the sites to the destination DirectAdmin server
- Repoint the DNS for those websites to the destination DirectAdmin server
- Implement the DirectAdmin command below
Below is the command to make a DirectAdmin server auto-install Let’s Encrypt certificates on all its sites. This command must be executed as the server’s root user. It will automatically set up Let’s Encrypt SSL certifictes for all domains that lack them.
This is a relatively new Let’s Encrypt feature for DirectAdmin. It is a great way to easily secure all of the server’s website’s connections at once. It saves you the time of going into many sites on the server and manually setting up SSL on each of them. You can use this script to secure a large number of sites all at once.
Make sure you’ve enabled Let’s Encrypt on the DirectAdmin system. Then log in to your command line interface as the root user. You can install certificates for all domains using the following script. It contains 4 lines. Each can be executed individually to ensure each works okay on your system:
cd /root wget -O autoletsencrypt.sh http://files.directadmin.com/services/all/letsencrypt/autoletsencrypt.sh chmod 755 autoletsencrypt.sh ./autoletsencrypt.sh