wip github actions CI
[plcapi.git] / tests / ci / setup / setup_apache.sh
old mode 100644 (file)
new mode 100755 (executable)
index 781f203..0867ad7
@@ -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
@@ -26,4 +29,6 @@ else
 fi
 echo "export HTTPSERVER=localhost" >> /etc/apache2/envvars
 
+ls -la /etc/apache2/mods-enabled
+
 service apache2 restart