Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I'm setting up Django with mod_wsgi on Apache and I've been debugging the errors that appear in the error log. However, I can't always get it to create a log.

My process is goes something like this. It's pure guessing right now, but every 10-15 minutes of trying, I'm able to make the log appear.

  • open up the url a couple times to get Internal Server Error in the browser
  • restart Apache for good measure
  • refresh the directory in Filezilla
  • close and reopen PuTTY and Filezilla
  • repeat until the log appears, then delete it, so you know the new log file contains only new errors

Terrible logic, I know. I'm just wondering, what actually causes the error to log or not log?

share|improve this question
up vote 2 down vote accepted

First of all, you shouldn't be deleting the logs, you should be emptying them. You can do this by either piping nothing into the file, or overwriting it with a blank file. The first being best. If you are determined to delete the file you should restart the service, this will generate a new log properly. Deleting an open file like you are doing messes with the file accounting for both the webserver process and the OS. This should give you a bit more consistency.

As for "Internal Server Error" this is a generic term. You need to use the HTTP code so that it is clear on what error the browser is actually getting. IE 500, 501, 400, 404, etc. Also be syre that you are examining all log files for the webserver process. Foe example in Apache there may be one for that particular vhost for access logs ie. an one for errors ie. as well as generic access.log and error.log, and othervhost.access.log etc.

Your lack of specifics makes it hard to help you with your issue.

share|improve this answer
Thanks for answering. Can you be more specific on piping? It's a 500 error, which seems to be caused by a large number of things, so not sure how much that helps. How can I find a list of log files? Thanks! – User Jun 27 '14 at 23:58

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.