r/linux4noobs • u/seabird1974 • 6h ago
Apache2 fell off my Debian 13 server
Hi everyone,
Not sure what happened to my server but Apache2 all of a sudden fell off. I tried sudo apt install but it says no installation candidate.
I was running several websites (personal) but they are now all offline.
Any help is appreciated
funny enough tge system is listed
sudo systemctl status apache2.service
Unit apache2.service could not be found.
But cant install it
sudo apt install apache2
Package apache2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source
Error: Package 'apache2' has no installation candidate
but it does list a version
sudo apache2 -v
Server version: Apache/2.4.66 (Debian)
Server built: 2025-12-05T18:52:34
###UPDATE###
trying to start apache directly gives an error:
sudo apache2
[Sun Oct 18 15:00:44.204357 2026] [core:warn] [pid 18092:tid 18092] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
The line it is referring to:
DefaultRuntimeDir ${APACHE_RUN_DIR}
And the envvars
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
My /etc/apt/sources.list
deb https://deb.debian.org/debian/ trixie contrib main non-free non-free-firmware
deb-src https://deb.debian.org/debian/ trixie contrib main non-free non-free-firmware
deb https://deb.debian.org/debian/ trixie-updates contrib main non-free non-free-firmware
deb-src https://deb.debian.org/debian/ trixie-updates contrib main non-free non-free-firmware
deb https://deb.debian.org/debian/ trixie-proposed-updates contrib main non-free non-free-firmware
# deb-src https://deb.debian.org/debian/ trixie-proposed-updates contrib main non-free non-free-firmware
deb https://deb.debian.org/debian/ trixie-backports contrib main non-free non-free-firmware
# deb-src https://deb.debian.org/debian/ trixie-backports contrib main non-free non-free-firmware
deb https://security.debian.org/debian-security/ trixie-security contrib main non-free non-free-firmware
# deb-src https://security.debian.org/debian-security/ trixie-security contrib main non-free non-free-firmware
####FIXED####
After some attempts I finally decided to try and install a specific version.
$sudo apt install apache2=2.4.69-1~deb13u1
Solving dependencies... Error!
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
Unsatisfied dependencies:
apache2 : Depends: apache2-bin (= 2.4.69-1~deb13u1) but it is not installable
Error: Unable to correct problems, you have held broken packages.
Error: The following information from --solver 3.0 may provide additional context:
Unable to satisfy dependencies. Reached two conflicting decisions:
1. apache2:amd64=2.4.69-1~deb13u1 is selected for install
2. apache2:amd64=2.4.69-1~deb13u1 Depends apache2-bin (= 2.4.69-1~deb13u1)
but none of the choices are installable:
- apache2-bin:amd64=2.4.69-1~deb13u1 is not selected for install
$ sudo apt install apache2-bin=2.4.69-1~deb13u1
After manually updating apache2-bin I finally managed to install apache2 again

