comparison deploy/provision.d/100-apache-config.sh @ 1602:b22e234c3c7b deploy

Install (but don't use) ssl version
author Chris Cannam
date Thu, 24 Aug 2017 14:26:26 +0100
parents 83412a0a2389
children 18643ab36008
comparison
equal deleted inserted replaced
1601:07deb8466f65 1602:b22e234c3c7b
4 4
5 # Install Apache config files and module loaders 5 # Install Apache config files and module loaders
6 6
7 cd /var/www/code 7 cd /var/www/code
8 8
9 codeconffile=/var/www/code/deploy/config/code.conf.gen 9 codeconf=/var/www/code/deploy/config/code.conf.gen
10 codeconfssl=/var/www/code/deploy/config/code-ssl.conf.gen
10 11
11 if [ ! -f "$codeconffile" ]; then 12 if [ ! -f "$codeconf" ]; then
12 echo "ERROR: Apache config file $codeconffile not found - has the database secret been interpolated from its input file correctly?" 13 echo "ERROR: Apache config file $codeconf not found - has the database secret been interpolated from its input file correctly?"
13 exit 2 14 exit 2
14 fi 15 fi
15 16
16 if [ ! -f /etc/apache2/sites-enabled/10-code.conf ]; then 17 if [ ! -f /etc/apache2/sites-enabled/10-code.conf ]; then
17 18
26 ln -s ../mods-available/perl.conf /etc/apache2/mods-enabled/ 27 ln -s ../mods-available/perl.conf /etc/apache2/mods-enabled/
27 ln -s ../mods-available/expires.load /etc/apache2/mods-enabled/ 28 ln -s ../mods-available/expires.load /etc/apache2/mods-enabled/
28 ln -s ../mods-available/rewrite.load /etc/apache2/mods-enabled/ 29 ln -s ../mods-available/rewrite.load /etc/apache2/mods-enabled/
29 ln -s ../mods-available/cgi.load /etc/apache2/mods-enabled/ 30 ln -s ../mods-available/cgi.load /etc/apache2/mods-enabled/
30 31
31 cp "$codeconffile" /etc/apache2/sites-available/code.conf 32 cp "$codeconf" /etc/apache2/sites-available/code.conf
33 cp "$codeconfssl" /etc/apache2/sites-available/code-ssl.conf
32 ln -s ../sites-available/code.conf /etc/apache2/sites-enabled/10-code.conf 34 ln -s ../sites-available/code.conf /etc/apache2/sites-enabled/10-code.conf
33 35
34 apache2ctl configtest 36 apache2ctl configtest
35 37
36 fi 38 fi