Public bug reported: due to the way the systemd service file for apache2 is configured, Apache is started before the Network has been configured by the system, as a result, it fails to start if it is required to bind to a specific IP or interface.
I'm not sure where is the best to fix this, so I'm reporting this on apache. One fix I can imagine is if the systemd service file is modified to wait for all network interfaces to be configured first, or wait for a specific interface. This is the way I intend to workaround this in my case (which will likely cause me to get prompted every update about overwriting). [workaround] Systemd provides an executable which will block until a specified interface is available, and this can be used to make apache wait until the desired interface is configured by using the ff directive in the unit file: ExecStartPre=/lib/systemd/systemd-networkd-wait-online -i enp4s0 In this case above, systemd will wait until interface enp4s0 is up (assigned an IP) before it attempts to start apache2. You can replace en04s0 with the relevant interface on your machine. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: apache2 2.4.29-1ubuntu4.2 ProcVersionSignature: Ubuntu 4.15.0-30.32-generic 4.15.18 Uname: Linux 4.15.0-30-generic x86_64 Apache2ConfdDirListing: False Apache2Modules: ApportVersion: 2.20.9-0ubuntu7.2 Architecture: amd64 Date: Sun Aug 12 09:37:54 2018 ProcEnviron: TERM=xterm PATH=(custom, no user) LANG=en_US.UTF-8 SHELL=/bin/bash SourcePackage: apache2 UpgradeStatus: No upgrade log present (probably fresh install) error.log: [Sun Aug 12 06:25:02.256640 2018] [mpm_prefork:notice] [pid 26304] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations [Sun Aug 12 06:25:02.256703 2018] [core:notice] [pid 26304] AH00094: Command line: '/usr/sbin/apache2' [Sun Aug 12 09:18:11.209390 2018] [mpm_prefork:notice] [pid 26304] AH00169: caught SIGTERM, shutting down modified.conffile..etc.apache2.apache2.conf: [modified] modified.conffile..etc.apache2.ports.conf: [modified] mtime.conffile..etc.apache2.apache2.conf: 2018-05-09T00:13:58.013470 mtime.conffile..etc.apache2.ports.conf: 2018-05-08T20:15:00.040132 ** Affects: apache2 (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1786675 Title: Apache will not start on boot if bound to a fixed IP address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1786675/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs