Apache2 unexcepted behavior log file

31 views Asked by At

Since today, error log from apache stop writting in the path i've given, instead it goes back in the default logging file.

I the apache2 vhost config, i've set the ErrorLog to a value

${APACHE_LOG_DIR}/ghost_error.log ,

but when there is error to log, it's write in the

${APACHE_LOG_DIR}/error.log

We are using Flask with apache2.

There is the config file for apache2

<VirtualHost *:80>
[...]
ServerAdmin webmaster@localhost
WSGIScriptAlias / /var/www/ghost/ghost.wsgi

[...]

ErrorLog ${APACHE_LOG_DIR}/ghost_error.log
CustomLog ${APACHE_LOG_DIR}/ghost_access.log combined
</VirtualHost>

And there is the wsgi file:

#!/usr/bin/python
try:
  ghost_path='/home/www'
  chdir_this = '%s/ghost/' % ghost_path
  activate_this = '%s/ghost_env/bin/activate_this.py' % ghost_path
  import os
  os.chdir(chdir_this)
  execfile(activate_this, dict(__file__=activate_this))

  reload(os)
  import sys
  import logging

  os.chdir(os.path.abspath(os.path.dirname(__file__) + "/App/"))
  sys.path.insert(0, os.path.abspath(os.path.dirname(__file__) + "/App/"))
  sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
  from App import app as application
except Exception, e:
  import traceback
  with open('/tmp/ghost.fail.log', 'w') as f:
    f.write("%s\n%s" % (e, traceback.format_exc()))

We simply have no idea of where it can come from. If you do have some hint to follow !

Thanks.

0

There are 0 answers