- 环境**:Ubuntu,Apache HTTPD,使用python 3.6编译的mod_wsgi,网站(假设):www.example.comtestthisout.com
- 问题**:我有2个不同的Web应用程序,将使用2个不同的Python虚拟环境。它们将托管在 * testthisout.com/app1 * 和 * testthisout.com/app2 *
我一直在绞尽脑汁地思考如何让Apache使用两种不同的虚拟环境。
- 相关Apache配置**:
LoadModule wsgi_module "/apps/python/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"
WSGIPythonHome "/apps/python"
<VirtualHost *:80>
ServerName testthisout.com
ServerAdmin testthisout@gmail.com
WSGIScriptAlias /app1 /var/www/flaskapp/app1/app1.wsgi
WSGIScriptAlias /app2 /var/www/flaskapp/app2/app2.wsgi
</VirtualHost>
理想情况下,app1应使用托管在/apps/python/python-app1/的python包。理想情况下,app2应使用托管在/apps/python/python-app2/的python包。
已尝试以下页面,但仍不了解如何执行此操作...
https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.htmlhttps://modwsgi.readthedocs.io/en/develop/user-guides/configuration-guidelines.html
请让我知道任何建议...
1条答案
按热度按时间polhcujo1#
最后经过大量的研究,我想出了一些有效的东西...