How To Fix Apache Could Not Reliably Determine FQDN

Wednesday, February 27th 2013. | how to

#howto ,#tutorial #VPS – How To Fix Apache Could Not Reliably Determine FQDN – This tutorial explains step by step guide (with pics) about How To Fix Apache Could Not Reliably Determine FQDN

In this short guide I will show you how to fix an error happens on Apache-based server with message output: apache2: Could not reliably determine the server’s fully qualified domain name. This kind of error is not categorized as crucial but pretty necessary to get fixed to avoid annoying message each time a user restarts or reloads Apache web server. The Fully Qualified Domain Name or also known as FQDN is basically simply another name for the complete domain name for a specific computer, or host, on the Internet. WikiPedia explains it as a domain name that specifies its exact location in the tree hierarchy of the Domain Name System a.k.a DNS. Commonly, FQDN has a format like something.domain.tld e.g: host.servermom.com.

Error Symptom

When a user tries to restart Apache2 service using either one of these commands:

/etc/init.d/apache2 restart

or,..

service apache2 restart

that user will then get error message saying:

* Restarting web server apache2                                                                                                                             apache2: apr_sockaddr_info_get() failed for server
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
 ... waiting apache2: apr_sockaddr_info_get() failed for server

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

here a screenshot pic taken from my playground server:

apache2 error fqdn

This kind of error can simply be ignored but it will be better to be fixed. The error message is just a warning and Apache should still work fine but once again, the solution is pretty simple and easy so you better fix it.

p.s: When I say “server” it refers to both VPS or Dedicated one.

How To Fix FQDN Issue On Apache

Step 1 – Login to your server via SSH. You can use either Putty on Windows or Terminal if you are on Mac or Linux. If you can, you better login as root or as a user with root privilege.

Step 2 – Now issue following command syntax:

nano /etc/apache2/httpd.conf

Step 3 – You’ll now in Nano text editor. If you see a blank screen, just don’t worry it is normal. Now type following line in there..

ServerName localhost

Like this one:

fix apache fqdn error

Once done, save it and exit. In Nano editor the command to save should be Control+O while Control+X used to exit.

Step 4 – Next, simply restart Apache2 service. There are two most common commands used to accomplish that task. You can use either..

/etc/init.d/apache2 restart

or,..

service apache2 restart

That’s it. Now you should see the error has gone.

fixed already

Enjoy!!..

p.s: for CentOS users please read the guide here (in step 5).

This post How To Fix Apache Could Not Reliably Determine FQDN is part of ServerMom.

Source link