Tuesday, February 12, 2008

Ubuntu Apache ServerName Warning

ServerName Warning. If you get following warning message:

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

Make sure to add ServerName theservername in /etc/apache2/apache2.conf.

If ServerName directive is not set, then the default virtual host will respond to all request. Hens, the web site will work but the apache2 will return warning message during /etc/init.d/apache2 restart.

Tips. If you want your server to respond to with/without www. prefix, try ServerAlias directive.

No comments: