How to Resolve httpd: Could not reliably determine the server's fully qualified domain name

Met a message when restarting the httpd service:

[root@www ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using www.mydomain.com for ServerName
                                                           [  OK  ]

It is a warning message from httpd for notifying you the server name have not been assigned explicitly in Apache, so the warning message can be resolved by indicating a fully qualified domain name in httpd configuration file:

[root@www ~]# vi /etc/httpd/conf/httpd.conf
...
#ServerName www.example.com:80

Please cancel the leading comment symbol "#" and replace the server name into yours.

ServerName www.mydomain.com:80

Let's try to restart it again.

[root@www ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

The warning message disappeared.

Leave a Reply

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