实在是没办法,我手上只有一个windows2008的老电脑,单位的,没法变系统,将就用了。
试了几天,iis无解。
apache 2.4,都配置好了,django1.7 + python3.4 +apache24。
mod_wsgi是下载的“mod_wsgi‑3.5.ap24.win32‑py3.4.zip”
httpd.conf里面添加有:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias / E:/Software/Apache24/htdocs/mytest/mytest/wsgi.py
WSGIPythonPath E:/Software/Apache24/htdocs
DocumentRoot "E:/Software/Apache24/htdocs"
其中“wsgi.py”是用的django自动生成的。
路径都没有问题。
apache可以运行,但打开网页报如下错误:
mod_wsgi (pid=5656): Target WSGI script 'E:/Software/Apache24/htdocs/mytest/mytest/wsgi.py' cannot be loaded as Python module.
mod_wsgi (pid=5656): Exception occurred processing WSGI script 'E:/Software/Apache24/htdocs/mytest/mytest/wsgi.py'.