#ps auxwww
dpkg --list | grep php
ps auxwww | grep fpm
- pwd
- sudo env
+ #pwd
+ #sudo env
#systemctl status apache2.service
#ls -la /etc/apache2/mods-enabled
#ls -la /etc/apache2/conf-enabled
#ls -la /etc/apache2/sites-available/
#sudo cat /etc/apache2/envvars
#sudo cat /etc/apache2/sites-available/000-default.conf
+ ls -ltr /var/log
+ ls -ltr /var/log/apache2
sudo cat /var/log/privoxy/*
sudo cat /var/log/apache2/error.log
sudo cat /var/log/apache2/other_vhosts_access.log
# 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
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
php${PHPSUFFIX}-mbstring \
php${PHPSUFFIX}-xdebug
else
- # on GHA runners ubuntu version, php 7.4 and 8.0 seem to be preinstalled. remove them if found
-
+ # on GHA runners ubuntu version, php 7.4 and 8.0 seem to be preinstalled. Remove them if found
+ for PHP_CURRENT in $(dpkg -l | grep -E 'php.+-common' | awk '{print $2}'); do
+ if [ "${PHP_CURRENT}" != "php${PHP_VERSION}-common" ]; then
+ apt-get purge -y "${PHP_CURRENT}"
+ fi
+ done
DEBIAN_FRONTEND=noninteractive apt-get install -y language-pack-en-base software-properties-common
LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php