mod_wsgi를 사용하여 장고를 배포하는 데 문제가있는 것 같습니다. 과거에는 mod_python을 사용했지만 변경하고 싶습니다. 나는 여기서 Graham Dumpleton 노트를 사용했다. http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango1 그러나 여전히 작동하지 않는 것 같다. 내부 서버 오류가 발생합니다. 내 아파치 오류 로그에서 mod_wsgi에서 django 응용 프로그램을 배포 할 때의 문제점
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>
django.wsgi file:
[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.
mod_python을 사용하여 배포를 시도했을 때 같은 문제가 발생했습니다. 내가 한 일은 내 httpd 파일에'SetEnv PYTHON_EGG_CACHE/tmp'를 가지고 있었고 이것이 가능했을 것이다. 그러나 이것은 mod_wsgi에서 작동하지 않습니다. – Shehzad009
내가 연결 한 WSGIPythonEggs 지시어를 사용해 보셨습니까? 오류 메시지가/tmp를 언급하지 않으면 환경 변수가 인식되지 않습니다. –
아파치 htppd 파일에'WSGIPythonEggs/tmp'를 넣으면 작동하는 것처럼 보입니다. 감사합니다. – Shehzad009