systemd

Useful Debian systemd commands

Apache

 a2ensite (config file)
 a2dissite (config file)

... and then

 systemctl reload apache2
 systemctl [start|stop] apache2
 systemctl status
 systemctl status apache2 

failed services

See them with

 systemctl list-units --state=failed

error messages with

 journalctl -u servicename.service
  
 systemctl edit apache2 # will edit the override file with nano
 systemctl restart postgrey

2022-02-21 it was reporting "notify-email@apache2.service" was down. clear it with

 systemctl reset-failed notify-email@apache2.service

2025-07-23 installed apparmor and bind9 wouldn't start. Had to edit /etc/apparmor.d/usr.sbin.named to change the /var/log/named/ directory line to just the file, restart apparmor, double check that /var/log/named was bind:bind and 644, and restart bind9

See the journal

 journalctl -u mariadb
 journalctl -u apache2
 journalctl -f # follow
 journalctl -f -u apache2.service # follow, only that service

bind / dns

Zone files are in /var/named/

Conf file is in /etc/bind/named.conf.local

 systemctl reload bind9