Frage

That have:
1) ubuntu 11.10
2) cherokee (https://launchpad.net/~cherokee-webserver/+archive/ppa) (version 1.2.101)
installed like this:

sudo apt-get install cherokee
sudo apt-get install libcherokee-mod-rrd
sudo apt-get install cherokee-doc

3) uwsgi (version 0.9.8.1-1) installed like this:

sudo apt-get install uwsgi uwsgi-plugin-python

4) Django 1.3.1 (sudo pip install django)

Run:
1) add example.com to hosts file (example.com 127.0.0.1)
2) create uwsgi.xml

<uwsgi>
    <pythonpath>/var/www/vtest/</pythonpath>
    <pythonpath>/var/www/</pythonpath>
    <app mountpoint="/">
        <script>django_wsgi</script>
    </app>
</uwsgi>

and django_wsgi.py

import os
import django.core.handlers.wsgi

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
application = django.core.handlers.wsgi.WSGIHandler()

3)

/var/www$ sudo django-admin.py startproject vtest
/var/www$ sudo chown -R www-data:www-data vtest/

Move file uwsgi.xml, django_wsgi.py to /var/www/vtest and chmod +x django_wsgi.py
4) add virtual server in cherokee-admin vservers -> add -> platforms -> uwsgi choise uwsgi.xml document root /var/www/vtest in console:

ps -A | grep uwsgi
6352 ?        00:00:00 uwsgi

if run uwsgi command in console:

/var/www/vtest$ /usr/bin/uwsgi -s 127.0.0.1:59238 -x /var/www/vtest/uwsgi.xml
tmp = /
[uWSGI] parsing config file /var/www/vtest/uwsgi.xml
*** Starting uWSGI 0.9.8.1-debian (32bit) on [Sun Jan 15 13:28:42 2012] ***
compiled with version: 4.6.1 on 28 June 2011 10:38:32
 *** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
uwsgi socket 0 bound to TCP address 127.0.0.1:59238 fd 3
your server socket listen backlog is limited to 100 connections
*** Operational MODE: single process ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 6515, cores: 1)

in browser example.com:
500 Internal Server Error
what could be the cause of the error? And this line: "no app loaded. going in full dynamic mode" in the console.

War es hilfreich?

Lösung

you have not loaded the python plugin with

<plugins>python</plugins>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top