The title says it all.
My problem:
I reboot my server and Apache is dead, websites are down.
Seems like Apache is trying to bind on all IPs... but why?
If I check why, by issuing: service apache2 status
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-12-15 00:25:19 CET; 18s ago
Docs: https://httpd.apache.org/docs/2.4/
Dec 15 00:25:19 y systemd[1]: Starting The Apache HTTP Server...
Dec 15 00:25:19 y apachectl[563]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using [ipv6 addr]. Set the 'ServerN>
Dec 15 00:25:19 y apachectl[563]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address 1.2.3.4:80
Dec 15 00:25:19 y apachectl[563]: no listening sockets available, shutting down
Dec 15 00:25:19 y apachectl[563]: AH00015: Unable to open logs
Dec 15 00:25:19 y apachectl[549]: Action 'start' failed.
Dec 15 00:25:19 y apachectl[549]: The Apache error log may have more information.
Dec 15 00:25:19 y systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Dec 15 00:25:19 y systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 15 00:25:19 y systemd[1]: Failed to start The Apache HTTP Server.
- OS is a bone-stock Ubuntu 20.04.3 LTS running on a server.
- The server has two (ipv4) IPs and I want Apache to only bind to 1 ipv4.
/etc/apache2/ports.conf
contains only this:
Listen 1.2.3.4:80
<IfModule ssl_module>
Listen 1.2.3.4:443
</IfModule>
<IfModule mod_gnutls.c>
Listen 1.2.3.4:443
</IfModule>
Each VirtualHost only contains:
<VirtualHost *:80>
</VirtualHost>
And a separate config for SSL (auto-created by Certbot ACME).