[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Starting Apache Webserver in bookworm





On Sat, Apr 19, 2025 at 8:42 AM 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?

Regards
  Christoph

To recap, commands and files.

### Uninstall and Purge Apache Configuration Files
sudo apt purge apache2

### Install Apache
sudo apt install apache2

### Apache systemD Config File
sudo vim /usr/lib/systemd/system/apache2.service

### Apache Config Test
sudo /usr/sbin/apachectl configtest

### Start Apache
# SystemD
sudo systemctl start apache2
# Apache Control Command
sudo /usr/sbin/apachectl start
# SysVinit Script - launches SystemD systemctl
sudo /etc/init.d/apache2 start

### Check Apache Status
# SystemD
sudo systemctl status apache2
# JournalD
sudo journalctl -u apache2

### Apache Log Files
sudo less /var/log/apache2/access.log
sudo less /var/log/apache2/error.log





--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

Reply to: