D
D
Dmitry2015-03-24 09:36:45
Django
Dmitry, 2015-03-24 09:36:45

[error] No handlers could be found for logger "django.request" why is it giving this error?

Installed Debian 7;
I tried to install from apache2 + mod_wsgi + django distribution: installed debian via aptitude apache/2.2.22, mod_wsgi/3.3 python/2.7.3 and django/1.4 - everything worked on such settings!
Now I tried to install Django-1.7.7 on another machine in the apache2+mod_wsgi+django bundle via pip install Django==1.7.7
I get the following error: [error] No handlers could be found for logger "django.request";
site.conf file:

VirtualHost 192.168.137.3:80>
    ServerName                  192.168.137.3

    ErrorLog                    /home/dima/site/logs/apache2_error_log
    CustomLog                   /home/dima/site/logs/apache2_access_log common

    WSGIDaemonProcess           majani.ru processes=2 threads=15 display-name=%{GROUP}
    WSGIProcessGroup            majani.ru

    WSGIScriptAlias /           /home/dima/site/wsgi.py
    #WSGIPythonPath             /home/dima/site

    <Directory /home/dima/site>
    <Files wsgi.py>
    Order allow,deny
    Allow from all
    </Files>
    </Directory>
</VirtualHost>

The wsgi.py file is in the same directory as site.conf
import os, sys

sys.path.append('/home/dima/site')
sys.path.append('/home/dima/site/mysite')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Help please, who than can!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
igorcc, 2015-03-24
@pyHammer

Here is the working configuration.
Then you can twist - as your heart desires.

import os, sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Application.settings")
sys.path.append('/var/www/Application')
sys.path.append('/var/www/Application/Application ')
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

ServerAdmin [email protected]
Alias ​​/static/ /var/www/Application/static/
Options -Indexes
Order deny,allow
Allow from all
WSGIDaemonProcess somecompany.ru processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup somecompany. en
WSGIScriptAlias ​​/ /var/www/Application/Application/wsgi.py
DocumentRoot /var/www/Application
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/site-error. log
# Possible values ​​include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/site-access.log combined

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question