Skip to content

Commit 1c3e297

Browse files
authored
Merge pull request hestiacp#780 from hestiacp/feature-autossl
Enable HTTP-to-HTTPS redirection automatically when SSL is enabled
2 parents 5c3568a + 4c8a367 commit 1c3e297

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/v-add-web-domain-ssl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
109109
add_web_config "$PROXY_SYSTEM" "$PROXY.stpl"
110110
fi
111111

112-
113112
#----------------------------------------------------------#
114113
# Hestia #
115114
#----------------------------------------------------------#
@@ -121,6 +120,9 @@ increase_user_value "$user" '$U_WEB_SSL'
121120
update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
122121
update_object_value 'web' 'DOMAIN' "$domain" '$SSL' "yes"
123122

123+
# Enabling automatic SSL redirection
124+
$BIN/v-add-web-domain-ssl-force "$user" "$domain"
125+
124126
# Restarting web server
125127
$BIN/v-restart-web $restart
126128
check_result $? "Web restart failed" >/dev/null

0 commit comments

Comments
 (0)