git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wip github actions CI
[plcapi.git]
/
tests
/
ci
/
setup
/
setup_apache.sh
diff --git
a/tests/ci/setup/setup_apache.sh
b/tests/ci/setup/setup_apache.sh
old mode 100644
(file)
new mode 100755
(executable)
index
5faee24
..
366f59e
--- a/
tests/ci/setup/setup_apache.sh
+++ b/
tests/ci/setup/setup_apache.sh
@@
-1,12
+1,12
@@
#!/bin/sh
#!/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)
# @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
DEBIAN_FRONTEND=noninteractive apt-get install -y apache2
@@
-15,14
+15,20
@@
DEBIAN_FRONTEND=noninteractive apt-get install -y apache2
a2enmod rewrite proxy_fcgi setenvif ssl
a2enmod rewrite proxy_fcgi setenvif ssl
+# in case mod-php was enabled (this is the case on at least github's ubuntu with php 5.x and shivammathur/setup-php)
+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
# configure apache virtual hosts
cp -f "$SCRIPT_DIR/../config/apache_vhost" /etc/apache2/sites-available/000-default.conf
-if [ -n "${TRAVIS}" ]; then
+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
fi
echo "export TESTS_ROOT_DIR=$(pwd)" >> /etc/apache2/envvars
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
service apache2 restart