Apache2 unexcepted behavior log file

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


We are using Flask with apache2.

There is the config file for apache2

<VirtualHost *:80> [...] ServerAdmin [email protected] 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 !


Category:python Views:1 Time:2019-01-10

Related post

  • Change Mysql, php and apache2 log file formats 2009-07-22

    I am sending php errors, all mysql queries, apache2 errors and mod_rewrite debugging to one file, needless to say it's busy in there. Can the format be changed from: [22-Jul-2009 23:00:58] Parameters: GET Array ( ) POST Array ( ) [22-Jul-2009 23:00:5

  • How to have separate Apache2 log files depending on the user of mod_userdir? 2011-11-15

    I'm using mod_userdir on Apache 2.2 to give multiples users access to a web server (for their tests and other stuff). I would like to give my users access to apache logs (so that they can debug their scripts) but log entries (both ErrorLog and Custom

  • Best place to store configuration files and log files on Windows for my program? 2008-11-06

    I need to store log files and configuration files for my application. Where is the best place to store them? Right now, I'm just using the current directory, which ends up putting them in the Program Files directory where my program lives. The log fi

  • How do I make the web browser log all activity, including requests, responses, cookie activity, to a log file that I can inspect? 2009-04-01

    I am debugging a session mismatch problem in a web application. There are several servers involved, and the user is passed between them while holding session tokens and cookies. The coordinating point is the browser. I want to know in detail what act

  • Put Debug Info and Error Info into two different log file (Log4net) 2009-04-28

    I am using NHibernate and log4net. This is a snapshot of my error log file, using a release version of my software: INFO 2009-04-28 03:07:06 - processing cascade NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for: bpojob.Generated.Busine

  • Log to database instead of log files 2009-07-21

    I'm interested in sending all Rails application logging to a database (MySQL or MongoDB) either in addition to or instead of to a log file. There are a few reasons, most of which are concerned about log file analysis. We already use Google Analytics,

  • Linux file craziness - strange behaviour getting last line of log file 2009-08-06

    I am trying to get the last line of a file. The file, ff.log, is getting new data every second while ffmpeg is working. The log file looks like this: frame= 20 fps= 0 q=7.7 size= 40kB time=1.24 bitrate= 266.1kbits/s frame= 30 fps= 28 q=6.6 size= 51kB

  • TempDB Log File Growth Using Global Temp Tables 2009-08-13

    This is really a two prong question. One, I'm experiencing a phenomenon where SQL server consumes a lot of tempDB log file space when using a global temp table while using a local temp table will consume data file space? Is this normal? I can't find

  • Log files not being written to (Passenger) 2009-11-24

    Locally, my app runs fine on and writes to its logs. My production server is running CentOS with an Apache server running Passenger. When trying to debug, I noticed my log files were not being written to. First thing I did was chmod 0666 them, and wh

  • MongoDB to store different (schema) log files 2010-01-07

    Do you think that using a MongoDB Json Database to store log files from application is a good idea and why ? The only advantage for me is the schema abstraction, but i think it's also a weakness we cannot ensure the integrity of a log file. ---------

  • Can Apache httpd be made to log errors to console instead of log files under Windows? 2010-04-27

    I'm doing infrequent development with Apache/PHP on my Windows machine so I've opted to run apache as a console process instead of a service. It would be nice if errors could be logged to the console window instead of a logfile so I can see them imme

  • Rails: How to write to a custom log file from within a rake task in production mode? 2010-05-18

    I'm trying to write to my log files while running a rake task. It works fine in development mode, but as soon as I switch to the production environment, nothing is written to the log files. I read here http://stackoverflow.com/questions/1022093/how-d

  • strange messages in log file @^@^@^@^@^@^@^@^@^@^@^@^@^@^@^ 2010-06-15

    I have a application server for network operations written with Java based on Apache Mina. Recently I encounter a strange behavior in my log files. I noticed that the log file is full of @^@^@^@^@^@^@^@^@^@^@^@^.... characters. I mean those unexpecte

  • How can I read a server log file? 2010-07-24

    I set up an httpd server in linux mandriva 2010. How can I find the server log file? Do I have to write that log file? I'm a new bee in this area. Any suggestion will be appreciated. Thanks in advance. --------------Solutions------------- I'm a Redha

  • Is having multiple data/log files a good thing even on the same LUN? 2010-10-08

    I have read that it is a good idea to have one file per CPU/CPU Core so that SQL can more efficiently stream data to and from the disks. Ok, I can see the benefit if they are on different spindles, but what if I only have one spindle (4 drives in Rai

  • how to split files from error.log file of apache server while reading file line by line continuously? 2010-11-03

    I have done like this but I am having trouble with shellscript I have written. I am confused with tail command functionality and also when I see output of error.log on terminal it shows lines with 'e' deleted from words. I have written like this plea

  • Why can my Django app not write to its log file? 2010-11-04

    $ sudo /etc/init.d/apache2 restart * Restarting web server apache2 ... waiting . ...done. [email protected] Thu Nov 04 18:54:37 ~/public_html/IDM_app $ sudo tail -n 60 /var/log/apache2/error.log [Thu Nov 04 18:54:27 2010] [error] [client

  • shellscript to monitor nginx log file on Gentoo expires after log file was gzip'ed 2010-12-10

    this is a follow up question of my previous question So I have this shellscript to monitor a nginx log file on Gentoo, the problem is the log file were renamed and gziped after certain file size or period of time, the shellscript still looking up the

  • Multiple Logging files (per WSGI project) in Apache under the same VirtualHost 2011-01-14

    I'm currently running a setup where different projects are served according to URL: http://machine_address/project_nameA http://machine_address/project_nameB (...) Since all projects are served under the same VirtualHost, I ended up having each proje

  • Installer Transaction with ExternalUI destroys my log files 2011-02-15

    Strange behavior with Installer Transaction and ExternalUI that destroys my log files. I'm chaining three MSIs in this Transaction. I make a verbose log file for each Setup. In the end my "last" verbose Log will be deleted. It is always the "last" on

  • Is it possible to open a log file programmatically if it's continously being written to? 2011-02-23

    Or will this generate an error? I just wanted to know if this were possible before I put forth the effort to implement this behavior into my application. Sorry for the naivety... Note: I'm using log4j for logging, and by 'opening a log file programma

  • Double Output in Log4perl Log File 2011-03-14

    I'm working on a new feature in an existing Perl codebase that will allow us to log the commands being sent to the database. I'm basing the solution off of Log4perl, which prevents me from having to reinvent several wheels. Unfortunately, I'm running

  • What determines the applicative log file location in Apache/Django? 2011-03-27

    (Cross posted to Server Fault some time ago) I have a django app running on Apache/ubuntu, and I have evidently misconfigured it. When I start apache, I'm getting this error in the apache log: ... IOError: [Errno 2] No such file or directory: '/home/

  • How do I tail a log file without locking in perl 2011-04-06

    This is how I am doing it right now but it locks the file. #!/usr/bin/perl use Env qw( $USERNAME ); use File::Tail; use strict; use warnings; my $file = $ARGV[0]; print "$file\n"; my $fileTail = File::Tail->new( name=>$file, maxinterval=>5,

  • How can I check drupal log files 2011-06-21

    how can I check drupal log files. I m using Ubuntu 10.10 + apache2 + php 5.33 + mysql for drupal 7. --------------Solutions------------- To view entries in Drupal's own internal log system (the watchdog database table), go to http://example.com/admin

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.087 (s). 11 q(s)