Can I deploy both python 2 and 3 django app with apache using mod_wsgi?

前提是你 提交于 2019-12-01 11:11:34

No you cannot. The mod_wsgi module for Apache is compiled for one Python version only. You cannot load more than one instance of mod_wsgi into Apache at the same time.

What you may be better off doing is using mod_wsgi-express, which allows running of Apache with mod_wsgi in a more easy way where mod_wsgi is a part of your Python installation or virtual environment. You could then have any front end web server proxy to different mod_wsgi-express instances where each is using different Python versions.

See:

Also go back and read through past mod_wsgi articles where I have talked about mod_wsgi-express and proxying on my blog site:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!