Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

When trying to restart apache2,

I type:

sudo /etc/init.d/apache2 restart

Response I get:

Could not reliably determine the server's fully qualified domain name

Can anyone tell me what I'm doing wrong?

share|improve this question

1 Answer 1

In the main configuration file, make sure the ServerName has a proper value.


Find or add the following

ServerName localhost

You can use any FQDN instead of localhost.

share|improve this answer

Your Answer


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.