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
Merge pull request #88 from patzerr/wrapPhpClass-with-changed-namespace
[plcapi.git]
/
tests
/
ci
/
setup
/
setup_apache.sh
diff --git
a/tests/ci/setup/setup_apache.sh
b/tests/ci/setup/setup_apache.sh
index
b7ac4e8
..
b29cde2
100755
(executable)
--- a/
tests/ci/setup/setup_apache.sh
+++ b/
tests/ci/setup/setup_apache.sh
@@
-2,7
+2,7
@@
# Install and configure apache2
# Has to be run as admin
# 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
ubuntu
versions (precise to focal)
set -e
set -e
@@
-11,18
+11,23
@@
SCRIPT_DIR="$(dirname -- "$(readlink -f "$0")")"
DEBIAN_FRONTEND=noninteractive apt-get install -y apache2
# set up Apache for php-fpm
DEBIAN_FRONTEND=noninteractive apt-get install -y apache2
# set up Apache for php-fpm
-# @see https://github.com/travis-ci/travis-ci.github.com/blob/master/docs/user/languages/php.md#apache--php
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)
+# in case mod-php was enabled (this is the case at least on GHA'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
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}" -o -n "${GITHUB_ACTIONS}" ]; 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 "${GITHUB_ACTIONS}" ]; then
echo "export TESTS_ROOT_DIR=$(pwd)" >> /etc/apache2/envvars
else
echo "export TESTS_ROOT_DIR=/var/www/html" >> /etc/apache2/envvars
echo "export TESTS_ROOT_DIR=$(pwd)" >> /etc/apache2/envvars
else
echo "export TESTS_ROOT_DIR=/var/www/html" >> /etc/apache2/envvars