Skip to content

Commit 7237caf

Browse files
authored
Give priority to webmail.*.conf (hestiacp#3400)
1 parent d59a5c3 commit 7237caf

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

bin/v-change-sys-webmail

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ for user in $($BIN/v-list-sys-users plain); do
5151
done
5252
done
5353

54+
if [ -d /etc/apache2/ ]; then
55+
sed -i "s/IncludeOptional conf.d\/domains\/$WEBMAIL_ALIAS.*.conf/IncludeOptional conf.d\/domains\/$NEW_ALIAS.*.conf/g" /etc/apache2/apache2.conf
56+
fi
57+
5458
#----------------------------------------------------------#
5559
# Hestia #
5660
#----------------------------------------------------------#

install/deb/apache2/apache2.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ LogFormat "%{User-agent}i" agent
8181
LogFormat "%b" bytes
8282

8383
IncludeOptional conf.d/*.conf
84+
IncludeOptional conf.d/domains/webmail.*.conf
8485
IncludeOptional conf.d/domains/*.conf
8586

8687
# Include the virtual host configurations:

install/rpm/httpd/httpd.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ LogFormat "%{User-agent}i" agent
7070
LogFormat "%b" bytes
7171

7272
Include conf.d/*.conf
73+
IncludeOptional conf.d/domains/webmail.*.conf
7374
IncludeOptional conf.d/domains/*.conf
7475

7576
ErrorDocument 403 /error/403.html

install/upgrade/versions/1.7.1.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,10 @@ if [ "$FIREWALL_SYSTEM" = "iptables" ]; then
3737
sed -i 's|/install/deb/firewall/ipset/blacklist.sh|/install/common/firewall/ipset/blacklist.sh|g' $HESTIA/data/firewall/ipset.conf
3838
fi
3939
fi
40+
41+
if [ "$WEB_SYSTEM" = "apache2" ]; then
42+
if ! (grep -q "$WEBMAIL_ALIAS.*.conf" /etc/apache2/apache2.conf); then
43+
echo "[ * ] Update /etc/apache2/apache2.conf..."
44+
sed -i "s/IncludeOptional conf.d\/domains\/\*.conf/IncludeOptional conf.d\/domains\/$WEBMAIL_ALIAS.*.conf\nIncludeOptional conf.d\/domains\/\*.conf/g" /etc/apache2/apache2.conf
45+
fi
46+
fi

0 commit comments

Comments
 (0)