
This small guide shows how to change the hostname on a Linux Server and how to avoid the warning: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
HowTo
Open the and edit the hostname file:
Change the hostname as desired and save the file and exit
Open the hosts file
Edit the /etc/hosts file to reflect our new change
127.0.0.1 YourHostName
Edit your httpd.conf and add your ServerName
Add your server name:
Reboot the system for the new changes to take effect
Done!



Posted in
Tags:
«







this post is very usefull thx!
Thanks for this clarification on the error message “Could not reliably determine the server’s fully qualified domain name”.
It should be noted that you do not have to reboot the system in order for the changes to take place. You can simply restart the apache2 server software by using ‘apachectl graceful’ (for a “graceful” restart) or even just ‘apachectl restart’ .
The difference between the “graceful” and “normal” (for lack of a better term) restart is that with a “graceful” restart, the server should reload its configuration without terminating any connections or requests that any user might be making to the Apache2 web server at the time of the restart.
I may be wrong in some of the things I said in the last part of this comment, so don’t take my word for it! Reading the documentation helps to understand this a lot better :)