A site for solving at least some of your technical problems...
A site for solving at least some of your technical problems...

Lately, I have had this error happen quite often after a reboot. It does not happen each time, but when it does, Apache just doesn't start at all.
Apr 21 12:49:06 monster systemd[1]: Starting apache2.service - The Apache HTTP Server... Apr 21 12:49:07 monster apachectl[3514]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address 192.168.2.1:81 Apr 21 12:49:07 monster apachectl[3514]: no listening sockets available, shutting down Apr 21 12:49:07 monster apachectl[3514]: AH00015: Unable to open logs Apr 21 12:49:07 monster systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Apr 21 12:49:07 monster systemd[1]: apache2.service: Failed with result 'exit-code'. Apr 21 12:49:07 monster systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
Looking into it closer, it clearly says that the IP address I'm trying to listen on does not exist. This means Apache checked each interface and it was not able to find one with the specific IP address.
If you only used listen <port>, it would listen using address 0.0.0.0 (or :: in IPv6). In that case, it's not specific to an interface, so it works each time. But when specific to an interface, that interface needs to already be assigned an IP address for the listen to work.
What you have to do is add a couple of statements to the Apache systemctl setup so it doesn't start before the network IP addresses were assigned. Personally, I think it should be part of the default definition, but apparently the person setting up Apache thinks otherwise. Having Apache ready ASAP is good, but if it fails 50% of the time, it's not as useful (especially since when it fails to setup the listen it just bails out and never retries).
First, enter this in your console to edit an override file:
$ sudo systemctl edit apache2
By creating an override, further updates from the apache2 packages will not remove your changes, which is particularly useful here.
Now, enter the following three lines of code:
[Unit] After=network-online.target Wants=network-online.target
The system will include comments, make sure you add these at the correct location.
The comments further down show you the existing setup, but that won't be added to the override file.
The above says that you want Apache to start only after the network is "online," which means fully setup, including the IP addresses of each interface.