Page 1 of 1
How to generate SSL Cert for domain Properly
Posted: Wed Jul 22, 2020 11:47 am
by bfcrew
Hi,
As I know myVesta generate SSL for hostname automatically.
I found in VestaCP forum to generate SSL to the domain is by using these command:
# v-add-letsencrypt-domain 'admin' domain.com '' 'yes'
# v-update-host-certificate admin domain.com
# echo "UPDATE_HOSTNAME_SSL='yes'" >> /usr/local/vesta/conf/vesta.conf
Are those the correct way?
Because when I do those commands, the SSL cert for the hostname will be missing for a while, but it will be coming back in the next few days (I guess).
What is the better way?
Thanks,
bfcrew
Re: How to generate SSL Cert for domain Properly
Posted: Wed Jul 22, 2020 11:54 am
by myVesta
The way is correct, except you already have last line added in vesta.conf
See
https://forum.vestacp.com/viewtopic.php ... 53&p=72237
Why you think that SSL will be missing for a while?
It will be active instantly.
Re: How to generate SSL Cert for domain Properly
Posted: Wed Jul 22, 2020 11:58 am
by bfcrew
dpeca wrote: ↑Wed Jul 22, 2020 11:54 am
Why you think that SSL will be missing for a while?
It will be active instantly.
Because when I logged in again to the vesta panel it says the SSL is missing for the hostname.
But yeah it'll be back after a while (not instantly as far as I know)
Re: How to generate SSL Cert for domain Properly
Posted: Wed Jul 22, 2020 12:02 pm
by myVesta
It must be instantly.
Maybe you are not opening myVesta via hostname address, or hostname is different set.
Re: How to generate SSL Cert for domain Properly
Posted: Wed Jul 22, 2020 12:09 pm
by bfcrew
Okay, it's no big deal as long as the SSL is active again

Thanks for your superb fast response!
Re: How to generate SSL Cert for domain Properly
Posted: Thu Jul 23, 2020 1:39 pm
by bfcrew
OK I got an error in one of my server, I didn't get root access so I need to use sudo command.
Code: Select all
debian@focus:/usr/$ sudo /usr/local/vesta/bin/v-add-letsencrypt-domain 'admin' domain.com '' 'yes'
debian@focus:/usr/$ sudo /usr/local/vesta/bin/v-update-host-certificate admin domain.com
debian@focus:/usr/$ sudo echo "UPDATE_HOSTNAME_SSL='yes'" >> /usr/local/vesta/conf/vesta.conf
-bash: /usr/local/vesta/conf/vesta.conf: Permission denied
How to fix that permission denied error?
Re: How to generate SSL Cert for domain Properly
Posted: Thu Jul 23, 2020 1:46 pm
by myVesta
I'm pretty sure you already have UPDATE_HOSTNAME_SSL='yes' in /usr/local/vesta/conf/vesta.conf
Because myVesta add it during installation.
Re: How to generate SSL Cert for domain Properly
Posted: Thu Jul 23, 2020 1:48 pm
by bfcrew
Oh right, so I don't need the last command?
Re: How to generate SSL Cert for domain Properly
Posted: Thu Jul 23, 2020 1:53 pm
by myVesta
That's right, no need.