Why does apache throw the error "Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName"?

Solution Verified - Updated -

Issue

  • When starting httpd, following message is displayed:
`httpd`: "Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName"
  • The Apache httpd configtest shows the following error message and httpd fails to start

RHEL 6

# service httpd configtest
httpd: Could not reliably determine the server's fully qualified domain name, using test.example.com for ServerName
Syntax OK

RHEL 7 onwards

# apachectl configtest
httpd: Could not reliably determine the server's fully qualified domain name, using test.example.com for ServerName
Syntax OK

Environment

  • Red Hat Enterprise Linux (RHEL)
  • Apache httpd
    • 2.2.15
    • 2.4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content