X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fci%2Fsetup%2Fsetup_apache.sh;h=e7930a6fd7e9de1a24e5589d3b18a9b58444b4af;hb=239391c98a446647086cb650f95b13184242bfb4;hp=7a6f3af4f3a40922ad2ed45a89348a7f8b661515;hpb=bf9efa344d27bd2c63aa77d083aa2de57494de41;p=plcapi.git diff --git a/tests/ci/setup/setup_apache.sh b/tests/ci/setup/setup_apache.sh index 7a6f3af..e7930a6 100755 --- a/tests/ci/setup/setup_apache.sh +++ b/tests/ci/setup/setup_apache.sh @@ -15,14 +15,20 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y apache2 a2enmod rewrite proxy_fcgi setenvif ssl -# in case mod-php was enabled -a2dismod php +# in case mod-php was enabled (this is the case on at least github's ubuntu with php 5.x and shivammathur/setup-php) +# @todo silence errors in a smarter way +rm /etc/apache2/mods-enabled/php* || true # configure apache virtual hosts cp -f "$SCRIPT_DIR/../config/apache_vhost" /etc/apache2/sites-available/000-default.conf -if [ -n "${TRAVIS}" ]; then +# default apache siteaccess found in GHA Ubuntu. We remove it just in case +if [ -f /etc/apache2/sites-available/default-ssl.conf ]; then + rm /etc/apache2/sites-available/default-ssl.conf +fi + +if [ -n "${TRAVIS}" -o -n "${GITHUB_ACTIONS}" ]; then echo "export TESTS_ROOT_DIR=$(pwd)" >> /etc/apache2/envvars else echo "export TESTS_ROOT_DIR=/var/www/html" >> /etc/apache2/envvars