How to Solve Error Message AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using xxx.xxx.xxx.xxx. Set the ‘ServerName’ directive globally to suppress this message

Posted on

Introduction

This article will have a focus on solving the error message of ‘How to Solve Error Message AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using xxx.xxx.xxx.xxx. Set the ‘ServerName’ directive globally to suppress this message’. The error message itself appear upon executing the command of ‘apachectl -t -D DUMP_MODULES’ or ‘apachectl -M’. It is a command for displaying or printing the available module in the Apache Webserver. The following is the execution of the command ‘apachectl -M’ :

root@hostname:/etc/apache2# apachectl -M
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 reqtimeout_module (shared)
 setenvif_module (shared)
 status_module (shared)
root@hostname:/etc/apache2# 

This is another output of the command execution using the command of ‘apachectl -t -D DUMP_MODULES’ :

root@hostname:/etc/apache2# apachectl -t -D DUMP_MODULES
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 reqtimeout_module (shared)
 setenvif_module (shared)
 status_module (shared)
root@hostname:/etc/apache2# 

Solution

Actually, the solution for handling the above problem is simple. Just edit the main configuration of Apache Webserver. Usually it exist in ‘/etc/apache2’ for an example. In this context, it is the location where the operating system is Linux Ubuntu 19.10. But normally, in general term of Linux or Unix operating system, it is exist in that location. Furthermore, the file configuration of the Apache Webserver is normally the ‘apache2.conf’. Just add the following line into the Apache Webserver’s file configuration :

Server hostname

Basically, the line configuration entry above is just for omitting the warning message above. Don’t forget to restart the Apache Webserver’s service. After successfully restarting the Apache Webserver’s service, the warning message above will disappear.

Leave a Reply