On Sat, 19 Apr 2025 10:03:58 +0200
Christoph Pleger <Christoph.Pleger@cs.tu-dortmund.de> wrote:
> Hello,
>
> after upgrading a computer from Debian 11 to Debian 12, I am unable to
> start apache2 by systemd. Even configuring the apache2 package hangs
> forever, if I do not kill the related processes and edit
> /var/lib/dpkg/info/apache2.postinst, commenting out all lines where
> apache2 is tried to be started.
>
> Trying to explicitly start apache2 for the CLI:
>
> 1. systemctl start apache2
>
> hangs
>
> 2. cp /etc/init.d/apache2 /root
> /root/apache2 start
>
> hangs
>
> 3. The only method I found so far that works, from the CLI:
>
> . /etc/apache2/envvars
> export APACHE_STARTED_BY_SYSTEMD=true
> apache2ctl start
>
> Any idea?
You may want to try reinstalling apache: sudo apt purge apache2 && sudo apt install apache2. Purging the package will get rid of all configuration files.
See if there are any clues in /var/log/apache2/error.log or the
earlier files. You'll need root privileges.
--
Joe