Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/
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!


share|improve this question
Can you post the httpd.conf section that you're using? Also, any entries in the /var/log/messages file? – Mike Fiedler Jun 3 '09 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 '09 at 10:57
I unenabled it and moved it out of sites-available and restarted it's still refusing connections :( – Adam Taylor Jun 3 '09 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 '10 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. – hexafraction Oct 12 '12 at 21:52

Run this command and post the output here

$apache2ctl -t

share|improve this answer
Good to know :) – drybjed Jun 3 '09 at 11:00
Really useful :-) Avoids crashing everything too often – Antoine Benkemoun Jun 3 '09 at 12:06

Create the needed log directory:

mkdir -p /var/www/logs/

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).

share|improve this answer

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.

share|improve this answer

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.

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.