Cheque a versão corrente do apache2 com o comando
apache2 -v
# apache2 -v
Server version: Apache/2.4.41 (Ubuntu)
Server built: 2022-01-05T14:49:56
Verifique em httpd.apache.org/download.cgi qual é a última versão e se diferente da instalada, siga com os demais passos (na escrita deste arquivo, a versão do apache2 era a 2.4.52).
Sabendo que o seu Apache está desatualizado, adicione o repositório abaixo e pressione [ENTER] quando solicitado.
sudo add-apt-repository ppa:ondrej/apache2
# sudo add-apt-repository ppa:ondrej/apache2
This branch follows latest Apache2 packages as maintained by the Debian Apache2 team with couple of compatibility patches on top.
It also includes some widely used Apache 2 modules (if you need some other feel free to send me a request).
IMPORTANT: The <foo>-backports is now required on older Ubuntu releases.
BUGS&FEATURES: This PPA now has a issue tracker: https://deb.sury.org/#bug-reporting
PLEASE READ: If you like my work and want to give me a little motivation, please consider donating: https://deb.sury.org/#donate
More info: https://launchpad.net/~ondrej/+archive/ubuntu/apache2
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Hit:1 http://br.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://br.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://br.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://br.archive.ubuntu.com/ubuntu focal-security InRelease
Get:5 http://ppa.launchpad.net/ondrej/apache2/ubuntu focal InRelease [23.8 kB]
Get:6 http://ppa.launchpad.net/ondrej/apache2/ubuntu focal/main amd64 Packages [4,784 B]
Get:7 http://ppa.launchpad.net/ondrej/apache2/ubuntu focal/main Translation-en [3,252 B]
Fetched 31.9 kB in 2s (18.0 kB/s)
Reading package lists... Done
Agora atualize a lista de pacotes e atualize os pacotes.
sudo apt update
sudo apt upgrade -y
Cheque novamente a versão do apache2
apache2 -v
# apache2 -v
Server version: Apache/2.4.52 (Ubuntu)
Server built: 2021-12-28T20:18:12