Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed apache2 in Debian Lenny but when I give the command sudo /etc/init.d/apache2 reload it gives me a statement saying "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName".

How can I change the server name? And how can I make it accessible from another system?

share|improve this question

2 Answers 2

As noted on a previous question, you can either specify a ServerName outside of any VirtualHost directive, or place a fully qualified domain name as the first name on the 127.0.1.1 line of your /etc/hosts file.

share|improve this answer

put a ServerName in /etc/apache2/sites-enabled/default

ServerName   mydomain.com

within the <VirtualHost></VirtualHost> section.

Then, make sure that name resolves to something, either modifying /etc/hosts or using something like dyndns.org to have a hostname that points to your home machine.

The basic installation Listens to all interfaces on port 80, so, once a machine knows to point to your site, it should be able to reach it.

The ServerName warning won't prevent things from working, it just makes things that rely on canonical redirection break.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.