Could not reliably determine the server’s fully qualified domain name

Published on February 16, 2011, by in linux, sysadmin.





After the initial install of Apache in Ubuntu, you’ll first see this message below:

stmiller@brahms:~$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName


If you are not planning on using virtualhosts or other configurations, you can simply create a file specifying the ServerName as below.

1. Create this apache config file:

sudo nano /etc/apache2/conf.d/fqdn

2. Add this to the file:

ServerName localhost

Or make it your desired host or domain name such as:

ServerName example.com

3. Save (in nano: Control + X, then Yes to confirm) and restart Apache:

sudo /etc/init.d/apache2 restart


Done!

Related posts:

  1. Securing Apache and PHP
  2. shellinabox With Apache Authentication Over HTTPS 443

One Response

  1. Veronica

    THANKS A LOT!!!!!!!!!!!!

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home linux Could not reliably determine the server’s fully qualified domain name
© Copyleft scottlinux.com CC BY-SA 3.0