【发布时间】:2011-03-03 15:40:40
【问题描述】:
我似乎在使用 mod_wsgi 部署 django 时遇到问题。过去我使用过 mod_python,但我想做出改变。我一直在这里使用 Graham Dumpleton 笔记http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango1,但它似乎仍然不起作用。我收到内部服务器错误。
django.wsgi file:
import os
import sys
sys.path.append('/var/www/html')
sys.path.append('/var/www/html/c2duo_crm')
os.environ['DJANGO_SETTINGS_MODULE'] = 'c2duo_crm.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
WSGIScriptAlias / /var/www/html/c2duo_crm/apache/django.wsgi
Apache httpd file:
<Directory /var/www/html/c2duo_crm/apache>
Order allow,deny
Allow from all
</Directory>
在我的 apache 错误日志中,它说我有这个错误这不是全部,但我有最重要的部分:
[Errno 13] Permission denied: '/.python-eggs'
[Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1]
[Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] The Python egg cache directory is currently set to:
[Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1]
[Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] /.python-eggs
[Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1]
[Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] Perhaps your account does not have write access to this directory? You can
[Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] change the cache directory by setting the PYTHON_EGG_CACHE environment
[Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] variable to point to an accessible directory.
【问题讨论】:
标签: python django apache deployment mod-wsgi