Use the command cd /etc/httpd to navigate to that directory. Now use the command sudo nano httpd.conf to open the configuration file for editing in root mode. It will ask you for your password.
Once you have the file open, you're going to want to panic. Don't. Press Control-w, and then type UseCanonicalName and press Enter. The cursor should jump to the spot in the file where that directive is. Use the arrow keys and the delete key to get rid of "On" and replace it with "Off". Now press Control-o followed by Enter to write (save) the file, then Control-x to exit the nano editor.
Now, still in the terminal, run sudo apachectl restart. That should restart the Apache web server.