自己编译的mod_wsgi需要注意python的prefix

Common mod_wsgi installation problems

如果你的 Python 和 mod_wsgi 是自己手工编译的,例如使用:

Python 的编译前配置:

./configure --prefix=/opt/py26

mod_wsgi 的编译前配置:

./configure --with-apxs=/usr/bin/apxs2 --with-python=/opt/py26/bin/python

那么在配置 apache 的时候,需要指明 WSGIPythonHome 参数:

WSGIPythonHome /opt/py26

即类似这样:

WSGIPythonHome /opt/py26
WSGIScriptAlias /pyblog /path/to/yourapplication.wsgi

Comments

Comment is disabled by administrator.