Apache is a powerful web server used by many websites. Sometimes, while using Apache, you may get an error message saying “Could Not Reliably Determine the Server’s Fully Qualified Domain Name”. In this article, we will look at how to fix this problem.
Apache2: Could Not Reliably Determine Server’s Fully Qualified Domain Name
Here are the steps to fix “Could Not Reliably Determine Server’s Fully Qualified Domain Name”. Actually, it is just a warning message and not really an error.
1. Open Apache Configuration
Open terminal and run the following command to open its configuration file.
$ sudo vi /etc/apache2/apache2.conf
Also read : How to Redirect HTTP to HTTPS in Custom Port
2. Fix the Issue
Add the following line.
ServerName localhost
If you have set a hostname in /etc/hostname, you can also use that name instead of localhost.
Also read : How to Fix NGINX : Too Many Open Files Error
3. Restart Apache Server
Restart Apache server to apply changes.
$ sudo systemctl reload apache2
This should solve your problem. However, if you see the following message.
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
then create a new file
$ sudo vi /etc/apache2/conf.d/fqdn
and add
ServerName localhost
Save and exit the file. Restart the server to apply changes.
Also read : How to Rsync Files Between Two Servers