Make sure you the access to the Zabbix Official Repository from vm.

repo.zabbix.com 443.

# get new packages
sudo apt update -y

# upgrade new packages
# look for zabbix packages in the log
sudo apt upgrade -y

# restart server

Go to history

Is it the same for apache2?

Lest try to fin dout.

whereis apache2
# several paths

/usr/sbin/apache2 -v
Server version: Apache/2.4.52 (Ubuntu)
Server built:   2024-04-10T17:45:18

sudo apt update
# no apache

# so this will not work
sudo apt install apache2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
apache2 is already the newest version (2.4.52-1ubuntu4.9).
apache2 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

Where does it fetch apache?

Lets block all outbound

ubuntu and zabbix urls

Hm, no apache2.

11.10 – Which repository do I add to automatically update Apache? – Ask Ubuntu

Zabbix is ready with a new version, lets update it.

sudo apt update -y

sudo apt list --upgradable

Listing... Done
python3-idna/jammy-updates,jammy-security 3.3-1ubuntu0.1 all [upgradable from: 3.3-1]
python3-update-manager/jammy-updates 1:22.04.20 all [upgradable from: 1:22.04.18]
update-manager-core/jammy-updates 1:22.04.20 all [upgradable from: 1:22.04.18]
zabbix-agent/zabbix 1:6.0.30-1+ubuntu22.04 amd64 [upgradable from: 1:6.0.29-1+ubuntu22.04]
zabbix-apache-conf/zabbix 1:6.0.30-1+ubuntu22.04 all [upgradable from: 1:6.0.29-1+ubuntu22.04]
zabbix-frontend-php/zabbix 1:6.0.30-1+ubuntu22.04 all [upgradable from: 1:6.0.29-1+ubuntu22.04]
zabbix-server-mysql/zabbix 1:6.0.30-1+ubuntu22.04 amd64 [upgradable from: 1:6.0.29-1+ubuntu22.04]
zabbix-sql-scripts/zabbix 1:6.0.30-1+ubuntu22.04 all [upgradable from: 1:6.0.29-1+ubuntu22.04]

sudo apt upgrade -y
Restarting services...
 systemctl restart zabbix-server.service
 systemctl restart zabbix-server.service

And zabbix has a new version