I'm managing 6 servers, 3 of which fail to start Apache after a reboot. The thing these 3 have in common is that they all rely on MySQL/MariaDB for storage of system users (via libnss-mysql-bg
). Apache has also been set up with mpm-itk
, causing websites to run under their own system users. This causes me to believe that the reason Apache fails to start at boot is that it sees references to system users in the vHost files (AssignUserID
) which it at that point can't find yet because MySQL hasn't finished starting up.
Unless someone can advise me a better solution, how do I make sure Apache only starts after MySQL is running? Apache also doesn't seem to have its own systemd service file.
The servers are all running Ubuntu 16.04.2 LTS with systemd.