mod-wsgi & apache & pyramid (pylonsproject)
i have a problem with running pyramid site under apache+mod-wsgi. the problem is that i can't tell apache which python interpretor is the right one for the site it serve. i have several virtual environments and i would like to take those python interpretors.
i added this code to my apache config:
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess pyramid user=karantan group=karantan processes=1 threads=4 python- path=开发者_JAVA百科/home/karantan/pyramid1.0/bin/python
WSGIScriptAlias /myapp /home/karantan/myproject/pyramid.wsgi
<Directory /home/karantan/myproject>
WSGIProcessGroup pyramid
Order allow,deny
Allow from all
</Directory>
there is also a parameter called WSGIPythonHome that tells apache which interpretor is the right one but i can't put it in this config because it is global variable (or something like that...)
so how do i run pyramid site with virtual environment under apache?
as stated above my main problem (i think) is that apache always runs pyramid with default system python interpretor (/usr/bin/python). how do i tell apache that it must take the one from the virtualenv.???
Documentation explaining how to use virtual environments with mod_wsgi can be found at:
http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
精彩评论