X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fci%2Fsetup%2Fsetup_apache.sh;h=0867ad73a9efc05723554a668ac1ab5630823847;hb=e4f610fb352911f137563729c9c823a683768d3c;hp=5faee24a0cc7f4e39107d9ff1db3d2ef183d6ebb;hpb=01960bf506d12eab1baa4480be313f91d06ab48b;p=plcapi.git diff --git a/tests/ci/setup/setup_apache.sh b/tests/ci/setup/setup_apache.sh old mode 100644 new mode 100755 index 5faee24..0867ad7 --- a/tests/ci/setup/setup_apache.sh +++ b/tests/ci/setup/setup_apache.sh @@ -1,12 +1,12 @@ #!/bin/sh -set -e - +# Install and configure apache2 +# Has to be run as admin # @todo make this work across all apache versions (precise to focal) -SCRIPT_DIR="$(dirname -- "$(readlink -f "$0")")" +set -e -# install and configure apache2 +SCRIPT_DIR="$(dirname -- "$(readlink -f "$0")")" DEBIAN_FRONTEND=noninteractive apt-get install -y apache2 @@ -15,6 +15,9 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y apache2 a2enmod rewrite proxy_fcgi setenvif ssl +# in case mod-php was enabled (this is the case on github's ubuntu with php 5.x at least) +a2dismod php || true + # configure apache virtual hosts cp -f "$SCRIPT_DIR/../config/apache_vhost" /etc/apache2/sites-available/000-default.conf @@ -24,5 +27,8 @@ if [ -n "${TRAVIS}" ]; then else echo "export TESTS_ROOT_DIR=/var/www/html" >> /etc/apache2/envvars fi +echo "export HTTPSERVER=localhost" >> /etc/apache2/envvars + +ls -la /etc/apache2/mods-enabled service apache2 restart