summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerman van Rink2017-10-19 09:15:13 +0200
committerHerman van Rink2017-10-19 09:15:13 +0200
commit147ded4f5258e151cf783d69b2efa60227a1202b (patch)
treee09d5e7d8fc4efb70b5b76b64f5b79a45297f906
parente20261582ccda350c561a3aea56e7306e457340d (diff)
Support Apache 2.4, conf-enabled dir structure
-rw-r--r--debian/aegir3-cluster-slave.postinst9
1 files changed, 8 insertions, 1 deletions
diff --git a/debian/aegir3-cluster-slave.postinst b/debian/aegir3-cluster-slave.postinst
index c0e863d..840e242 100644
--- a/debian/aegir3-cluster-slave.postinst
+++ b/debian/aegir3-cluster-slave.postinst
@@ -54,7 +54,14 @@ case "$1" in
# make sure we have apache configs settled in, for remote headless aegir servers
touch $VARLIB/config/apache.conf
chown aegir:aegir "$VARLIB/config/apache.conf"
- ln -sf $VARLIB/config/apache.conf /etc/apache2/conf.d/aegir.conf
+ if [ -d /etc/apache2/conf-enabled ]; then
+ # Apache 2.4
+ ln -sf $VARLIB/config/apache.conf /etc/apache2/conf-enabled/aegir.conf
+ else
+ # Apache 2.2
+ ln -sf $VARLIB/config/apache.conf /etc/apache2/conf.d/aegir.conf
+ fi
+
a2enmod ssl rewrite
apache2ctl graceful