mirror of
https://github.com/myvesta/vesta
synced 2025-07-16 10:03:23 -07:00
Making Vesta able to update hostname SSL automatically
This feature will allow VestaCP to automatically update system SSL when you add SSL to your domain (that is also hostname) through VestaCP panel. For example, if your server hostname is my.server.net and you add SSL to that domain (as you usually do via VestaCP panel), that SSL will be also installed to Vesta nginx (on 8083 port), to Exim and to devocot. This will work if you use LetsEncrypt, and it will also automatically apply renewed certificate when Vesta renew letsencrypt certificate. --- IMPORTANT --- This feature will work only if you have UPDATE_HOSTNAME_SSL='yes' in /usr/local/vesta/conf/vesta.conf Why? Because I'm not sure that Serghey want to use this mechanism for installing system SSL. So, this way it's only OPTIONAL feature, not enabled by default. On all servers nothing will happen. If Sergey likes this idea, he will easily make it enabled by default. Cheers.
This commit is contained in:
parent
082095b164
commit
b2e75d89b7
1 changed files with 7 additions and 0 deletions
|
@ -120,6 +120,13 @@ check_result $? "Web restart failed" >/dev/null
|
|||
$BIN/v-restart-proxy $restart
|
||||
check_result $? "Proxy restart failed" >/dev/null
|
||||
|
||||
if [ ! -z "$UPDATE_HOSTNAME_SSL" ] && [ "$UPDATE_HOSTNAME_SSL" = "yes" ]; then
|
||||
hostname=$(hostname)
|
||||
if [ "$hostname" = "$domain" ]; then
|
||||
$BIN/v-update-host-certificate $user $domain
|
||||
fi
|
||||
fi
|
||||
|
||||
# Logging
|
||||
log_history "enabled ssl support for $domain"
|
||||
log_event "$OK" "$ARGUMENTS"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue