Friday, August 12, 2011

apache2: Could not reliably determine the server's fully qualified domain name

This error is caused by an apache miss configuration. Below are those cases where I have seen it and how I have corrected them:

Sometimes it is just about duplicated directive ServerName. If you use Virtual hosts do not include a global directive but instead just define it in the virtual hosts files, for example:
...
<VirtualHost  nestorurquiza.com:443>
 SSLEngine on
 DocumentRoot "/var/nestorurquiza-app"
 ServerName nestorurquiza.com
...

Your server IP must be mapped to the server domain in /etc/hosts. It cannot be a loopback IP. Provide a separated line for that entry. Do not include any other mapping for the IP. If you need more then add them *below* the entry:
...
192.168.0.137   nestorurquiza.com
192.168.0.137   nestorurquiza
...

No comments:

Followers