FreeBSD で apache24 を 2.4.70 にアップグレードした際、以下のメッセージが表示された。
You may need to manually remove /usr/local/etc/apache24/extra/httpd-dav.conf if it is no longer needed.
You may need to manually remove /usr/local/etc/apache24/extra/httpd-default.conf if it is no longer needed.
You may need to manually remove /usr/local/etc/apache24/extra/httpd-languages.conf if it is no longer needed.
You may need to manually remove /usr/local/etc/apache24/extra/httpd-ssl.conf if it is no longer needed.
You may need to manually remove /usr/local/etc/apache24/extra/httpd-userdir.conf if it is no longer needed.
You may need to manually remove /usr/local/etc/apache24/httpd.conf if it is no longer needed.
You may need to manually remove /usr/local/etc/apache24/mime.types if it is no longer needed.
Message from apache24-2.4.70:
The default database format was changed from BerkeleyDB 5
(deprecated) from ports to BerkeleyDB 1 from base libc.
You must rebuild all your (RewriteMap) databases once after
upgrading from 2.4.62 to 2.4.62_1 or later.
設定ファイル内を検索して、DBM 形式のデータベースを使用しているか確認する。
grep -rnE “RewriteMap.*dbm:|AuthDBM” /usr/local/etc/apache24/
検索結果は何もなし。DBM 形式のデータベースは使用していないため、データベースの再構築作業は不要だった。
再起動時のポート競合エラーの解決
設定を反映させるため Apache を再起動しようとしたところ、ポート 80 がすでに使用中というエラーが出て起動に失敗した。
service apache24 restart
Performing sanity check on apache24 configuration:
Syntax OK
apache24 not running? (check /var/run/httpd.pid).
Performing sanity check on apache24 configuration:
Syntax OK
Starting apache24.
(48)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
/usr/local/etc/rc.d/apache24: WARNING: failed to start apache24httpd.pid がずれて古いプロセスが残ったままになっていたため、ポート 80 を掴んでいるプロセスを確認して停止させる。
sockstat -46 -l | grep :80
killall httpd
Apache の起動と動作確認
古いプロセスを停止したあと、改めて起動を実行。
service apache24 start
Performing sanity check on apache24 configuration:
Syntax OK
Starting apache24.
無事に起動完了。curl でローカルからの応答を確認し、HTTPS への 301 リダイレクトおよび WordPress サイトの表示も問題ないことを確認した。
curl -I http://localhost/
HTTP/1.1 301 Moved Permanently
Date: Wed, 11 Nov 2026 04:09:40 GMT
Server: Apache
Location: https://mydns.jp
Content-Type: text/html; charset=iso-8859-1
pkg info apache24
apache24-2.4.70
Name : apache24
Version : 2.4.70
Installed on : Wed Nov 11 12:46:35 2026 JST
Origin : www/apache24
Architecture : FreeBSD:14:amd64
Prefix : /usr/local
Categories : www
Licenses : APACHE20
Maintainer : apache@FreeBSD.org
WWW : https://httpd.apache.org/
Comment : Version 2.4.x of Apache web server