Apache2 を消去して再インストールした後、起動に失敗する

Apache2 を消去して再インストールした後、起動に失敗する

Ubuntu Server 20.04 のローカル LAN で Jitsi Meet を実行しようとしていて、昨日か 2 日前に成功したのですが、その後ポート転送を試してみたくなりました。もちろん、私はそれについて詳しいことは知らず、追加の IP 割り当て制限や静的アドレス指定なしで DHCP を使用しているため、再割り当てされたときに Server に通知して、マイナー ポート転送ルールを変更するだけだと考えました。IP が変更されたことを Server に通知する方法がわからなかったので、Apache2 と Jitsi を消去して再インストールするだけだと考えましたが、そうすると、Apache2 を消去して再起動し、再インストールしても、Apache2 は起動できなくなります。/etc/apache2 にある、消去しても削除されないという設定ファイルを削除しましたが、そこには古い IP もあったと思うので、再インストール時に新しい IP で再作成されるだろうと考えました。

# apt install apache2

...

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2020-08-16 18:01:37 UTC; 32ms ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 1948 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Aug 16 18:01:37 danserve apachectl[1958]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Aug 16 18:01:37 danserve apachectl[1958]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Aug 16 18:01:37 danserve apachectl[1958]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Aug 16 18:01:37 danserve apachectl[1958]: no listening sockets available, shutting down
Aug 16 18:01:37 danserve apachectl[1958]: AH00015: Unable to open logs
Aug 16 18:01:37 danserve apachectl[1948]: Action 'start' failed.
Aug 16 18:01:37 danserve apachectl[1948]: The Apache error log may have more information.
Aug 16 18:01:37 danserve systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Aug 16 18:01:37 danserve systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 16 18:01:37 danserve systemd[1]: Failed to start The Apache HTTP Server.

答え1

問題は、apache2 を削除したときに削除されなかった apache2 関連のパッケージがいくつかあり、それが問題の原因となっているようだったことです。

apache2 のみを削除しただけでは削除されない他の 3 つの apache2 パッケージを削除した後、再インストールすることで解決しました。

可能であれば、なぜそれが問題を解決したのかも知りたいです。

関連情報