Reproducing the Issue
sudo systemctl status apache2
Output
apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sat 2025-01-11 19:43:20 CET; 11s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 1607 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 30ms
Solution
Fix missing /var/log/apache2/
directory. Apache cannot access its log directory because it is missing.
Recreate the directory
sudo mkdir -p /var/log/apache2
Set the correct permissions (optional)
sudo chown -R www-data:www-data /var/log/apache2