Edit the ServerName line in the Apache configuration file (/etc/httpd/conf/ httpd.conf on Red Hat), and specify the name of your server as follows:
#vi /etc/httpd/conf/httpd.conf
Remove the # in the line that looks like this:
#ServerName <yourserver>
and insert your server name:
ServerName www.yourdomain.com
Replace www.yourdomain.com in this example with the default web host name you have registered in DNS for your web server. Or, if you are testing in a lab environment, enter the IP address you want to assign to the machine. (We will override this value in a VirtualHost container shortly.)