Apache does not restart after reboot on occasion

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Webmin version 2.653
Virtualmin version 8.1.0 Pro
Webserver version Apache version 2.4.52
Related packages SUGGESTED

Recently after doing a package update and when the system requires a reboot, My apache server does not automatically start like all the rest. It started doing this the past 6 months or so. It used to always restart automatically. What might be causing this suddenly.
It is annoying to have to make sure the server starts up after reboot.

Short of looking at the logs or the systemctl output at the time it is really hard to give much help.

t@main:~# systemctl status apache2.service 
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2026-06-12 20:27:08 EDT; 2 months 2 days ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 2460135 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
   Main PID: 3997382 (apache2)
      Tasks: 158 (limit: 19031)
     Memory: 175.9M
        CPU: 1h 41min 35.375s
     CGroup: /system.slice/apache2.service
             ├─2460151 /usr/sbin/apache2 -k start
             ├─2460154 /usr/sbin/apache2 -k start
             ├─2460155 /usr/sbin/apache2 -k start
             ├─2641318 /usr/sbin/apache2 -k start
             └─3997382 /usr/sbin/apache2 -k start

Aug 12 00:01:02 main.cisnetadmin.com systemd[1]: Reloading The Apache HTTP Server.
Aug 12 00:01:02 main.cisnetadmin.com systemd[1]: Reloaded The Apache HTTP Server.
Aug 13 00:00:54 main.cisnetadmin.com systemd[1]: Reloading The Apache HTTP Server.
Aug 13 00:00:54 main.cisnetadmin.com systemd[1]: Reloaded The Apache HTTP Server.
Aug 13 15:59:39 main.cisnetadmin.com systemd[1]: Reloading The Apache HTTP Server.
Aug 13 15:59:39 main.cisnetadmin.com systemd[1]: Reloaded The Apache HTTP Server.
Aug 14 00:01:09 main.cisnetadmin.com systemd[1]: Reloading The Apache HTTP Server.
Aug 14 00:01:09 main.cisnetadmin.com systemd[1]: Reloaded The Apache HTTP Server.
Aug 15 00:01:17 main.cisnetadmin.com systemd[1]: Reloading The Apache HTTP Server.
Aug 15 00:01:17 main.cisnetadmin.com systemd[1]: Reloaded The Apache HTTP Server.

make sure the service for it is enabled.
in the example above it is in the loaded line.

if it is not enabled enable it with systemctl enable nameofhttpd

Starting Apache is handled by systemd, rather than Virtualmin/Webmin, so it’s almost certainly unrelated to Virtualmin (it’s possible for Apache to fail to start due to various configuration problems, but if it can be manually started without complaint, it’s not that).

In the past there were issues on Debian (maybe some Ubuntu versions, too, I dunno), where if network was misconfigured or slow to come up, Apache would fail because it was waiting on network to completely load. Manually starting it wouldn’t have that wait.

If the service is enabled, the latter is where I’d look next. Check for other systemd services that failed to start or take a long time to start, specifically related to networking. Make sure you don’t have interfaces configured that can never come up or take a long time to come up (maybe waiting on DHCP that never arrives or something).