如何安装和安装为py3配置mod_wsgi [英] How to install & configure mod_wsgi for py3
问题描述
我安装了&为python2.7配置了mod_wsgi,但现在我也想为py3使用mod_wsgi
I installed & configured mod_wsgi for python2.7 but now I would also like to have mod_wsgi for py3
我在ubuntu 12.04中 我的apache conf文件对于py2.7如下所示:
I'm in ubuntu 12.04 My apache conf file looks like this for py2.7 :
<Directory /var/www/vhosts/my_web>
WSGIProcessGroup my_web
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
现在,我想为python3安装mod_wsgi.
Now I would like to install mod_wsgi for python3.
我想我必须去apt-get install libapache2-mod-wsgi-py3
I think I have to do apt-get install libapache2-mod-wsgi-py3
但是我找不到关于如何为py3配置mod_wsgi的任何说明. a)我可以保留py2.7的mod_wsgi还是需要删除它才能使Apache与mod_wsgi_py3一起使用? b)我需要在我的apache conf中包括什么?
But I can't find any instruction on how to configure mod_wsgi for py3. a) Can I keep mod_wsgi for py2.7 or do I need to remove it for apache to work with mod_wsgi_py3? b) What do I need to include in my apache conf?
推荐答案
sudo apt-get install libapache2-mod-wsgi-py3
这将替换libapache2-mod-wsgi并重新启动apache服务.
This will replace libapache2-mod-wsgi and will restart the apache service.
此处提供了更具体的说明(Django): https://docs.djangoproject .com/en/1.8/howto/deployment/wsgi/modwsgi/
More specific instructions (Django) are available for here: https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/
这篇关于如何安装和安装为py3配置mod_wsgi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!