如何安装 &为 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对于 py2.7,我的 apache conf 文件如下所示:
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屋!