Skip to content

Commit ef37bb1

Browse files
authored
Merge pull request hestiacp#2106 from jaapmarcus/fix/2104-v-change-web-domain-name
Fix hestiacp#2104 v-change-web-domain-name
2 parents 6e5b820 + 9161b9b commit ef37bb1

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
99
### Bugfixes
1010
- Improve the hostname check to prevent invalid hostnames or the use of an ip address (RFC1178).
1111
- Add small wait for /usr/bin/iptables-restore [Forum](https://forum.hestiacp.com/t/clean-install-arm64-does-not-start-after-reboot-v-start-service-iptables/4395/7)
12+
- Fixed 2104 v-change-web-domain-name unable to start webserver
1213

1314
## [1.4.12] - Service release
1415

bin/v-change-web-domain-name

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,30 @@ rm -f $HOMEDIR/$user/web/$new_domain/logs/$domain.*
8585
# Updating domain certificates
8686
if [ -e "$USER_DATA/ssl/$domain.crt" ]; then
8787
cd $USER_DATA/ssl
88-
mv $domain.crt $new_domain.crt
89-
mv $domain.ca $new_domain.ca
90-
mv $domain.pem $new_domain.pem
91-
mv $domain.key $new_domain.key
88+
mv $USER_DATA/ssl/$domain.crt $USER_DATA/ssl/$new_domain.crt
89+
mv $USER_DATA/ssl/$domain.ca $USER_DATA/ssl/$new_domain.ca
90+
mv $USER_DATA/ssl/$domain.pem $USER_DATA/ssl/$new_domain.pem
91+
mv $USER_DATA/ssl/$domain.key $USER_DATA/ssl/$new_domain.key
9292
rm -f $HOMEDIR/$user/conf/web/$domain/ssl/$domain.*
9393
fi
9494

95+
# Deleting vhost configuration
96+
del_web_config "$WEB_SYSTEM" "$TPL.tpl"
97+
# Deleting SSL configuration and certificates
98+
if [ "$SSL" = 'yes' ]; then
99+
del_web_config "$WEB_SYSTEM" "$TPL.stpl"
100+
fi
101+
102+
# Deleting proxy
103+
if [ ! -z "$PROXY_SYSTEM" ]; then
104+
del_web_config "$PROXY_SYSTEM" "$PROXY.tpl"
105+
if [ "$SSL" = 'yes' ]; then
106+
del_web_config "$PROXY_SYSTEM" "$PROXY.stpl"
107+
fi
108+
if [ -e "/etc/$PROXY_SYSTEM/conf.d/01_caching_pool.conf" ]; then
109+
sed -i "/=$domain:/d" /etc/$PROXY_SYSTEM/conf.d/01_caching_pool.conf
110+
fi
111+
fi
95112

96113
#----------------------------------------------------------#
97114
# Hestia #

0 commit comments

Comments
 (0)