Commit 76041325 authored by anarcat's avatar anarcat

make the provision package support nginx

parent 0a74dd4f
......@@ -38,13 +38,3 @@ Description: Makefile used to create the platform:
default.
.
If this is left empty, Aegir will use its internal makefile.
Template:aegir/webserver
Type: select
Description: Webserver type to use:
Aegir supports two different webserver engines. You need to select
which one you wish to use to deploy the main frontend
interface. Regardless of the option chosen here, you can still deploy
other webserver types on remote servers.
Default: apache2
Choices: apache2, nginx
......@@ -28,6 +28,14 @@ VARLIB="/var/aegir"
case "$1" in
configure)
db_get "aegir/webserver"
if [ ! -z "$RET" ]; then
if [ "$RET" = 'apache2' ]; then
RET='apache' # convert argument to something aegir can understand
fi
WEBSERVER="$RET"
fi
# add a aegir user if one does not already exist
if ! getent passwd aegir >/dev/null ; then
echo "adding aegir user..."
......@@ -51,11 +59,18 @@ case "$1" in
# fix permissions on installed directories
chown aegir:aegir "$VARLIB" "$VARLIB/config"
# 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
a2enmod ssl rewrite
apache2ctl graceful
touch $VARLIB/config/$WEBSERVER.conf
chown aegir:aegir "$VARLIB/config/$WEBSERVER.conf"
ln -sf $VARLIB/config/$WEBSERVER.conf /etc/apache2/conf.d/aegir.conf
case $WEBSERVER in
apache)
a2enmod ssl rewrite
apache2ctl graceful
;;
nginx)
service nginx reload
;;
esac
;;
abort-upgrade|abort-remove|abort-deconfigure)
......
Template:aegir/webserver
Type: select
Description: Webserver type to use:
Aegir supports two different webserver engines. You need to select
which one you wish to use to deploy the main frontend
interface. Regardless of the option chosen here, you can still deploy
other webserver types on remote servers.
Default: apache2
Choices: apache2, nginx
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment