วิธีติดตั้ง SSL ให้กับ Directadmin Controlpanel

/usr/bin/openssl req -x509 -sha256 -newkey rsa:4096 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9000 -nodes

chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem
chmod 400 /usr/local/directadmin/conf/cakey.pem

 

cd /usr/local/directadmin/scripts
./letsencrypt.sh request ใส่ hostname 4096

cd /usr/local/directadmin/conf
perl -pi -e ‘s/SSL=0/SSL=1/’ directadmin.conf
echo “carootcert=/usr/local/directadmin/conf/carootcert.pem” >> directadmin.conf
echo “force_hostname=ใส่ hostname” >> directadmin.conf
echo “ssl_redirect_host=ใส่ hostname” >> directadmin.conf
service directadmin restart