如何在Mac上使用mod_wsgi? [英] How can I get mod_wsgi working on Mac?
问题描述
几个小时以来,我一直在尝试安装最新版本的mod_wsgi(3.3).我在Snow Leopard上,并且具有系统随附的Apache(Apache/2.2.15)和Python 2.6.1(r261:67515)版本.
I have been trying to install the latest version of mod_wsgi (3.3) since hours on my Mac. I'm on Snow Leopard and I have the versions of Apache (Apache/2.2.15) and Python 2.6.1 (r261:67515) that come with the system.
提取文件并通过终端执行以下操作:
Extracted the file and executed the following through terminal:
./configure
make
sudo make install
./configure
make
sudo make install
我在httpd.conf中添加了LoadModule wsgi_module modules/mod_wsgi.so.
I added LoadModule wsgi_module modules/mod_wsgi.so to my httpd.conf.
通过从控制面板禁用和启用Web共享来重新启动Apache.
Restarted Apache by disabling and enabling Web Sharing from the control panel.
localhost停止工作,直到我删除添加的httpd.conf:(
localhost stops working until I remove the line I added httpd.conf :(
请帮助.预先感谢.
推荐答案
我使用 homebrew 的安装版本mod_wsgi
.这给了我mod_wsgi
的通用版本,可与香草apache一起使用.
I use the homebrew installed version of mod_wsgi
. That gives me a universal version of mod_wsgi
that works with the vanilla apache.
➔ file `brew list mod_wsgi`
/usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so: Mach-O universal binary with 2 architectures
/usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so (for architecture x86_64): Mach-O 64-bit bundle x86_64
/usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so (for architecture i386): Mach-O bundle i386
这篇关于如何在Mac上使用mod_wsgi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!