How to generate SSL Cert for domain Properly

Post Reply
bfcrew
Posts: 24
Joined: Mon Jun 22, 2020 3:41 pm
Been thanked: 2 times

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
User avatar
myVesta
Site Admin
Posts: 964
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

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.
bfcrew
Posts: 24
Joined: Mon Jun 22, 2020 3:41 pm
Been thanked: 2 times

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)
User avatar
myVesta
Site Admin
Posts: 964
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

It must be instantly.
Maybe you are not opening myVesta via hostname address, or hostname is different set.
bfcrew
Posts: 24
Joined: Mon Jun 22, 2020 3:41 pm
Been thanked: 2 times

Okay, it's no big deal as long as the SSL is active again :)
Thanks for your superb fast response!
bfcrew
Posts: 24
Joined: Mon Jun 22, 2020 3:41 pm
Been thanked: 2 times

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?
User avatar
myVesta
Site Admin
Posts: 964
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

I'm pretty sure you already have UPDATE_HOSTNAME_SSL='yes' in /usr/local/vesta/conf/vesta.conf
Because myVesta add it during installation.
bfcrew
Posts: 24
Joined: Mon Jun 22, 2020 3:41 pm
Been thanked: 2 times

Oh right, so I don't need the last command?
User avatar
myVesta
Site Admin
Posts: 964
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

That's right, no need.
Post Reply