VestaCP Admin Paneline SSL Eklemek

Here are the steps:
CODE:
cd /root
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto –help
Then run:
CODE:
./letsencrypt-auto certonly –renew-by-default –webroot -w /home/admin/web/[YOUR-HOSTNAME]/public_html -d [YOUR-HOSTNAME]
If succeed, this procedure will create folder /etc/letsencrypt/live/mydomain.com with cert.pem and privkey.pem files.

Now replace self-signed SSL with newly created SSL:

CODE:
cp /etc/letsencrypt/live/mydomain.com/cert.pem /usr/local/vesta/ssl/certificate.crt
cp /etc/letsencrypt/live/mydomain.com/privkey.pem /usr/local/vesta/ssl/certificate.key

Finaly, restart VestaCP:
CODE:
service vesta restart
That’s it.

P.S.
To renew SSL, every 2 months run via cron:
CODE: SELECT ALL
cd /root/letsencrypt
git pull
./letsencrypt-auto certonly –renew-by-default –webroot -w /home/admin/web/[YOUR-HOSTNAME]/public_html -d [YOUR-HOSTNAME]
cp /etc/letsencrypt/live/mydomain.com/cert.pem /usr/local/vesta/ssl/certificate.crt
cp /etc/letsencrypt/live/mydomain.com/privkey.pem /usr/local/vesta/ssl/certificate.key
sudo service vesta restart

No Comments

Post A Comment