Apacheのエラー:Could not reliably determine the server’s fully qualified domain name…

Apacheを再起動した際に、

httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

というエラーが出る場合がある。
これでも起動はするので、Apache自体は動くのだが、エラーをそのままにしておくのは気持ちが悪いし、あとあと問題を引き起こす可能性が高い。

日本語訳をすると

ServerNameに127.0.0.1を使用した、FQDN(完全に適切なドメイン名)が確定できませんでした。

といった感じか。

このエラーは、/etc/hosts にlocalhost以外に自分で設定したホスト名が、Apacheの設定ファイルに定義されていないために発生する。

広告

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               dacelo localhost.localdomain localhost

と書いた場合、/etc/httpd/conf/httpd.conf のServerNameの設定にも次のように書いておく。

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work.  See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName www.example.com:80
ServerName dacelo:80

About: dacelo


33 thoughts on “Apacheのエラー:Could not reliably determine the server’s fully qualified domain name…”

  1. 大変参考になりまりました。
    いつも気になっていたのですが、無視してました。
    こんなに簡単に直るとは・・・。

    有難うございました。

  2. Pingback: 齋藤 南郷
  3. Pingback: 内藤
  4. Pingback: どらにゅす
  5. Pingback: ゆふ
  6. Pingback: SHISHIDO
  7. まさにこれ。VagrantでUbuntu入れた後はネットワークアダプターが複数追加されている状態なので、Apacheにアクセスできる方を追加する。

Leave a Reply

Your email address will not be published. Required fields are marked *