[英]Installing mod_wsgi in Apache2.4 on Windows 7 x64
My current setup Python3.5 x64
, Apache2.4
我当前的设置Python3.5 x64
, Apache2.4
I am learning Python
and django
. 我正在学习Python
和django
。 I want to run django app using Apache
. 我想使用Apache
运行django应用。
I download mod_wsgi
binary from here http://www.lfd.uci.edu/~gohlke/pythonlibs/ 我从这里http://www.lfd.uci.edu/~gohlke/pythonlibs/下载了mod_wsgi
二进制文件
I picked up this one: mod_wsgi-4.4.23+ap24vc14-cp35-cp35m-win_amd64.whl
我捡起了这个: mod_wsgi-4.4.23+ap24vc14-cp35-cp35m-win_amd64.whl
I got mod_wsgi.so
after extract. 提取后我得到了mod_wsgi.so
。 I added that file in apache modules directory
. 我将该文件添加到apache modules directory
。
After that I added following code in httpd.conf file 之后,我在httpd.conf文件中添加了以下代码
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias / C:/djangoprojects/mysite/mysite/wsgi.py
WSGIPythonPath /C:/djangoprojects/mysite
<Directory C:/djangoprojects/mysite/mysite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
But I am getting following error. 但是我得到以下错误。
httpd.exe: Syntax error on line 183 of C:/Apache24/conf/httpd.conf: Cannot load modules/mod_wsgi.so into server: The specified module could not be found.
I am not able to load mod_wsgi
module. 我无法加载mod_wsgi
模块。 Need help. 需要帮忙。
I checked my installation and found that python for all
was missing. 我检查了安装情况,发现缺少python for all
。
I reinstall python3.5
with custom configurations
and enable python for all
option. 我使用custom configurations
重新安装python3.5
并python for all
选项启用python for all
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.