mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
Turn off ServerTokens for both Apache and PHP
This commit is contained in:
parent
1e75fa5c43
commit
a0ceec523d
@ -222,7 +222,19 @@ a2enmod rewrite \
|
||||
|
||||
# We don't use Apache PHP (just to be sure)
|
||||
a2dismod mpm_prefork
|
||||
|
||||
|
||||
# Disable server tokens in Apache
|
||||
if [[ -z "$(grep 'ServerSignature' /etc/apache2/apache2.conf)" ]]
|
||||
then
|
||||
{
|
||||
echo "# Turn off ServerTokens for both Apache and PHP"
|
||||
echo "ServerSignature Off"
|
||||
echo "ServerTokens Prod"
|
||||
} >> /etc/apache2/apache2.conf
|
||||
|
||||
check_command systemctl restart apache2.service
|
||||
fi
|
||||
|
||||
# Install PHP "$PHPVER"
|
||||
apt update -q4 & spinner_loading
|
||||
check_command apt install -y \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user