To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / extra / soundsoftware / scripted-deploy / vagrant / provision.d / 100-apache-config.sh @ 1586:d0d59d12db94
History | View | Annotate | Download (1.06 KB)
| 1 |
#!/bin/bash |
|---|---|
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
cd /var/www/code |
| 6 |
|
| 7 |
if [ ! -f /etc/apache2/sites-enabled/10-code.conf ]; then |
| 8 |
|
| 9 |
rm -f /etc/apache2/sites-enabled/000-default.conf |
| 10 |
|
| 11 |
cp extra/soundsoftware/scripted-deploy/config/passenger.conf /etc/apache2/mods-available/ |
| 12 |
cp extra/soundsoftware/scripted-deploy/config/passenger.load /etc/apache2/mods-available/ |
| 13 |
cp extra/soundsoftware/scripted-deploy/config/perl.conf /etc/apache2/mods-available/ |
| 14 |
|
| 15 |
ln -s ../mods-available/passenger.conf /etc/apache2/mods-enabled/ |
| 16 |
ln -s ../mods-available/passenger.load /etc/apache2/mods-enabled/ |
| 17 |
ln -s ../mods-available/perl.conf /etc/apache2/mods-enabled/ |
| 18 |
ln -s ../mods-available/expires.load /etc/apache2/mods-enabled/ |
| 19 |
ln -s ../mods-available/rewrite.load /etc/apache2/mods-enabled/ |
| 20 |
ln -s ../mods-available/cgi.load /etc/apache2/mods-enabled/ |
| 21 |
|
| 22 |
cp extra/soundsoftware/scripted-deploy/config/code.conf.interpolated /etc/apache2/sites-available/code.conf |
| 23 |
ln -s ../sites-available/code.conf /etc/apache2/sites-enabled/10-code.conf |
| 24 |
|
| 25 |
apache2ctl configtest |
| 26 |
|
| 27 |
fi |
| 28 |
|