Commit 2989dcc8 authored by anarcat's avatar anarcat Committed by anarcat

make install.sh create a server-wide config file and allow for backend-only configuration

parent 3491a1ef
......@@ -35,9 +35,8 @@ considered the canonical source of information.
Also note that those instructions setup a complete Aegir system. If you want
to only setup a new server, it should be sufficient to install requirement
(step 1) and configure them (step 2). You will then need a copy of provision
and drush installed (parts of install.sh, which will need to be re-written to
take into account this use case).
(step 1) and configure them (step 2). You will just need the -b flag to
avoid installing the frontend on the server.
1. Install software requirements
================================
......@@ -148,17 +147,18 @@ Shell commands::
Apache configuration
--------------------
The rewrite module must be enabled and also Apache must be given a directive
to include Aegir's vhosts path, to read configurations from there. In
Debian-based systems you can put a file inside ``/etc/apache2/conf.d`` that
will be parsed on startup or alternatively you can place the directive in
apache.conf/httpd.conf. We prefer the former. In other systems there are
similar ways to accomplish this. Consult your OS's documentation if unsure.
Aegir assumes a few Apache modules are available on the server, and
generates its own configuration files. The way we enable this is by
symlinking a single file which contains all the configuration necessary.
In Debian-based systems, you should symlink this file inside
``/etc/apache2/conf.d`` that will be parsed on startup or alternatively
you can place include that file in your apache.conf/httpd.conf. We
prefer the former. In other systems there are similar ways to accomplish
this. Consult your OS's documentation if unsure.
Shell commands as root::
a2enmod rewrite
echo "Include /var/aegir/config/vhost.d/" > /etc/apache2/conf.d/aegir
ln -s /var/aegir/config/apache.conf /etc/apache2/conf.d/aegir.conf
Database configuration
......
......@@ -10,9 +10,8 @@
#
# It should keep to strict POSIX shell syntax to ensure maximum
# portability. The aim here is to ease the burden on porters but also
# allow people using various platforms to zip through the install quicker.
#
# Eventually, all this should be performed by the Provision backend.
# allow people using various platforms to zip through the install
# quicker.
#
# This script also *DOES NOT CHECK* if the requirements have been met.
# It's up to the admin to follow the proper install instructions or use
......@@ -84,7 +83,7 @@ EOF
set -e
# parse commandline
args=`getopt V:w:d:h $*`
args=`getopt bV:w:d:h $*`
set -- $args
for i
......@@ -93,6 +92,7 @@ do
-w) shift; WEB_GROUP=$1; shift;;
-V) shift; AEGIR_VERSION=$1; shift;;
-d) shift; AEGIR_HOME=$1; shift;;
-b) BACKEND_ONLY=1; shift;;
-h) shift; usage; exit;;
--) shift; break;;
esac
......@@ -188,6 +188,29 @@ else
fi
fi
if [ -f $AEGIR_HOME/apache.conf ]; then
cat > $AEGIR_HOME/apache.conf <<EOF
NameVirtualHost *:80
NameVirtualHost *:443
<IfModule !env_module>
LoadModule env_module modules/mod_env.so
</IfModule>
<IfModule !rewrite_module>
LoadModule rewrite_module modules/mod_rewrite.so
</IfModule>
Include /var/aegir/config/vhost.d/
EOF
fi
msg "Aegir provision backend installed successfully"
if [ ! -z "$BACKEND_ONLY" ] ; then
exit 0
fi
if [ ! -d $HOSTMASTER_DIR ] ; then
msg "Deploying hostmaster application"
$DRUSH hostmaster-make $HOSTMASTER_DIR
......
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