在同一台服务器上具有python 2和python 3的WSGI应用程序? [英] WSGI apps with python 2 and python 3 on the same server?

查看:64
本文介绍了在同一台服务器上具有python 2和python 3的WSGI应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有一个用Python 2编写的Web应用程序,它可以在WSGI(特别是OpenERP Web服务器)上运行.

I already have a web application in written in Python 2 that runs over WSGI (specifically, OpenERP web server).

我想编写一个新的Web应用程序,该应用程序可以在同一服务器(Ubuntu上的Apache 2)上运行,但是使用WSGI和Python3.这两个应用程序将位于不同的端口上.

I would like to write a new web application that would run on the same server (Apache 2 on Ubuntu), but using WSGI and Python 3. The two applications would be on different ports.

有可能吗?

推荐答案

否,mod_wsgi是不可能的(请参见此处: https://github.com/GrahamDumpleton/mod_wsgi/issues/21 和此处:

No, it is not possible with mod_wsgi (see here: https://github.com/GrahamDumpleton/mod_wsgi/issues/21 and here: https://serverfault.com/questions/599859/multiple-python-versions-under-apachemod-wsgi)

这篇文章还提供了一种替代方法:使用nginx.

This post also provides an alternative: using nginx.

这篇关于在同一台服务器上具有python 2和python 3的WSGI应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆