有:
1) ubuntu 11.10
2)切诺基(https://launchpad.net/~cherokee-webserver/+archive/ppa) (1.2.101版)
安装方式如下:
sudo apt-get install cherokee
sudo apt-get install libcherokee-mod-rrd
sudo apt-get install cherokee-doc3) uwsgi (版本0.9.8.1-1),安装如下:
sudo apt-get install uwsgi uwsgi-plugin-python4) Django 1.3.1 (sudo pip install django)
Run
1)将example.com添加到主机文件(example.com 127.0.0.1)
2)创建uwsgi.xml
<uwsgi>
<pythonpath>/var/www/vtest/</pythonpath>
<pythonpath>/var/www/</pythonpath>
<app mountpoint="/">
<script>django_wsgi</script>
</app>
</uwsgi>和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/将文件uwsgi.xml、django_wsgi.py移动到/var/www/vtest和chmod +x django_wsgi.py
4)在cherokee中添加虚拟服务器->添加->平台-> uwsgi选择uwsgi.xml文档根/var/www/vtest:
ps -A | grep uwsgi
6352 ? 00:00:00 uwsgi如果在控制台中运行uwsgi命令:
/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)在浏览器example.com中:
500内部服务器错误
错误的原因是什么?这一行:“没有应用程序,进入完全动态模式”在控制台。
发布于 2012-01-15 13:33:59
您尚未将python插件加载到
<plugins>python</plugins>https://stackoverflow.com/questions/8868235
复制相似问题