90a207ed45919fdd5ec18dc8cfbb4c544691ffd3
[plcapi.git] / tests / ci / travis / setup_apache.sh
1 #!/bin/sh
2
3 # make sure all files and folders are accessible by Apache
4 sudo find $(dirname $(pwd)) -type d -exec chmod 755 {} \;
5 sudo find . -type f -name "*.php" -exec chmod 644 {} \;
6
7 # set up Apache for php-fpm
8 # @see https://github.com/travis-ci/travis-ci.github.com/blob/master/docs/user/languages/php.md#apache--php
9
10 sudo a2enmod rewrite actions fastcgi alias ssl
11
12 # configure apache virtual hosts
13 sudo cp -f tests/ci/travis/apache_vhost /etc/apache2/sites-available/000-default.conf
14 sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
15 sudo service apache2 restart