I'm not sure what to search for on google for this, but something strange happened when I restarted apache2. I'm using an ubuntu server, 11.04, and got this message

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

A strange IP, not even close to the one I have. Could it be someone changed this? Is there a way to change it back to

1 Answer 1


Normaly those errors have to do with your configured ServerName and the hosts-file.

Make sure you have an entry for localhost and one for the chosen ServerName in your /etc/hosts:         localhost
999.999.999.999   example.com

Make sure to set your IP instead of 999.999... and your hostname instead of example.com ;)

For further information google for "Apache2 could not reliably determine". You'll find something for sure.

  • Well what I'm asking is why it's Just seems like a random ip for it to set to. Dec 3, 2011 at 20:14
  • OK, two things come to mind: 1 ) If your running the Server behind a router or a NAT, you could check if this is your public IP (goto formyip.com or see here for commands to do the same). 2 ) Could your ServerName or the ServerName in Combination with the search domain in /etc/resolv.conf resolve to this IP?
    – Lukas
    Dec 3, 2011 at 20:36
  • One more thing that might be interesting is how apache does the lookups to determine the IP: First it tries a DNS-Lookup on the global ServerName. If that fails it will take the systems hostname (type hostname in console) and do a lookup on that. I don't know what it does if none of those resolve correctly though. The according part of the documentation can be found here
    – Lukas
    Dec 3, 2011 at 20:56
  • It's not my public ip, but I just did a whois look up (should've done that in the first place) based on your idea and it seems to be one of my ISPs DNS servers. I think that's it then. Strange that ubuntu would pick that ip though Dec 3, 2011 at 20:58
  • Also I think your latest comment answers the question, but it was the fact my /etc/hosts file wasn't correct, so I'll mark your answer correct Dec 3, 2011 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.