So I was adding a new site to my debian+apache2 setup and managed to blow up apache!

Investigating the error logs revealed that I had forgotten to create the directory for the log files:

[Tue Jun 02 12:26:51 2009] [notice] Graceful restart requested, doing restart
apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
(2)No such file or directory: apache2: could not open error log file /var/www/logs/rayipress.co.uk/error.log.
Unable to open logs

So I've created that file and the access log file and changed the permissions/ownership to a suitable setting.

I've also enabled/disabled this site. I disabled it straight away, then 'fixed' it, then enabled it.

It is still refusing connections but nothing else is appearing in the log or access file for apache (I'm tailing the file).

EDIT: Here's the recent contents of /var/log/messages - don't think any of that is relevant to the problem but I could be wrong.

And here's the contents on the config file for the new site that appears to be causing the problems.

EDIT2: Here's the output from apache2ctl -t

apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
Syntax OK

EDIT3: Wow, retarded, I was hitting apache2 reload instead of restart.. it's all fixed, thanks for your help!

Help would be most appreciated!


  • Can you post the httpd.conf section that you're using? Also, any entries in the /var/log/messages file? Jun 3, 2009 at 10:51
  • Are your site configuration secions in separate files in '/etc/apache2/sites-enabled/'? Move the offending configuration file to a different directory, restart Apache and check if it works. If it is, it's a problem with that particular configuration. If not, problem may be elsewhere.
    – drybjed
    Jun 3, 2009 at 10:57
  • I unenabled it and moved it out of sites-available and restarted it's still refusing connections :( Jun 3, 2009 at 11:04
  • i am guessing the fully qualified domain name error still remains, this is normally fixed though /etc/hosts.
    – Ash Palmer
    Oct 28, 2010 at 1:59
  • As per the practices of other sites, I'd add a self-answer describing your incorrect command and then accept it after the required time period.
    – nanofarad
    Oct 12, 2012 at 21:52

4 Answers 4


Run this command and post the output here

$apache2ctl -t

  • Good to know :)
    – drybjed
    Jun 3, 2009 at 11:00
  • Really useful :-) Avoids crashing everything too often Jun 3, 2009 at 12:06

Create the needed log directory:

mkdir -p /var/www/logs/rayipress.co.uk/

If that does not help, you can try:

apache2ctl configtest


strace -o hugeapache.log -f apache2 -X

That will create a huge logfile which can help with the debugging (put to some available url).


The "Could not reliably determine the server's fully qualified domain name, using for ServerName" message is just a warning and won't impact the running of your web server. You can try making sure that "hostname --fqdn" returns the correct value if you want to get rid of it. I'm not sure if apache makes additional checks beyond that.


Here's a quick tip. If your fixing a configuration error that caused a syntax error, you can usually just do a graceful restart of apache to have it pick up your fixes. However, run time errors like missing log file directories, bad permissions, full disks, etc require an actual restart of apache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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