Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Apache determine the FQDN?

I'm using Apache2, and when reloading/restarting the server I get this warning:

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

Everything works fine, but I'm trying to figure out what's causing the error. I'm grabbing the source to see if can find it, but since my C's not very good....

Some notes:

  • If I change the system hostname, Apache uses the new hostname
  • I have a ServerName set; it's the same as the hostname
  • I have a static, unique IP - dig (hostname) returns (my ip), dig -x (my ip) returns (hostname)
  • My hosts file is correct

Versions:

Apache/2.2.9
Linux 2.6.24-23-xen x86_64
Description:    Debian GNU/Linux 5.0 (lenny)

Any ideas?

like image 573
Peter Stone Avatar asked Oct 15 '25 09:10

Peter Stone


1 Answers

Are you sure you have a ServerName directive with the proper value - outside any <VirtualHost> blocks? (You also need a ServerName inside each <VirtualHost> block, of course)

When Apache gives out that error message, usually it means that it's not finding a ServerName for the server as a whole. If you do have that directive set properly, I can't imagine why Apache would still be complaining...

like image 166
David Z Avatar answered Oct 18 '25 03:10

David Z