Enable/disable the website setting.
a2ensite 000-yoursite
a2dissite 000-yoursite
Check syntax.
apache2ctl configtest
sudo journalctl -u apache2 -f
sudo journalctl -u apache2 -e
sudo is not required if the service is running under the current user.
journalctl -u myservice --since "2024-06-01 00:00:00" --until "2024-06-30 23:59:59"
journalctl -u myservice --since "2026-06-09" -o short --no-pager
systemctl status apache2
systemctl start apache2
systemctl stop apache2
systemctl restart apache2
systemctl reload apache2
systemctl list-units --type=service
systemctl daemon-reload
systemctl enable apache2
systemctl disable apache2