我是Django的新手,尝试使用mod_wsgi将应用程序部署到Apache 2.2中。 我有一个在C:\ Program Files(x86)\ Apache Software Foundation \ Apache2.2 \ htdocs中创建的mymapsite。在mymapsite中,我有一个mymap是应用程序。
在我的httpd.conf中,我添加了:
WSGIPythonPath "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/mymapsite/"
WSGIScriptAlias /mymap "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/mymapsite/mymapsite/wsgi.py"
在我的wsgi中,我有:
import os, sys
sys.path.append('C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/mymapsite/mymapsite')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mymapsite.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
我收到错误:
(9)Bad file descriptor: don't know how to spawn child process: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/mymapsite/mymapsite/wsgi.py
请咨询/