Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to restart my Apache but it doesn't work. This is the error:

Restarting web server apache2 
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message

I need some help. Thank you

share|improve this question
That's not an error, just a warning about a configuration problem. Are you sure you cannot access the server when you receive that message? –  SlightlyCuban Aug 6 '13 at 13:33
If I go on localhost it appears a window: You have chosen to open: witch is a: PHTML file from localhost –  Nistor Cristian Aug 6 '13 at 13:38
Sounds like Apache is running (run sudo service apache2 status to confirm), but you're serving out a .phtml file as your index in web root (typically /var/www). This is not normal, so I'd double-check your apache config to see why it is pointing to that file. –  SlightlyCuban Aug 6 '13 at 14:06
It is running but my index is .php in var/www –  Nistor Cristian Aug 6 '13 at 14:09
add comment

1 Answer 1

To fix that problem, you need to edit the httpd.conf file. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo gedit /etc/apache2/httpd.conf

By default httpd.conf file is blank, just add the following:

ServerName localhost

Once you're done, save the file, and restart the server.

sudo /etc/init.d/apache2 restart
share|improve this answer
add comment

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.