gpt4 book ai didi

python-2.7 - OpenShift Online 上的 Apache mod_wsgi 正在寻找的入口点是什么?

转载 作者:行者123 更新时间:2023-12-04 22:15:46 24 4
gpt4 key购买 nike

我有一个 OpenShift Python 2.7 应用程序,我猜它使用 mod_wsgi

是否可以通过 ssh 连接到 OpenShift Online 并查看位于如下位置的 .conf 文件:

/etc/apache2/sites-available/

我想查看 Apache 查找哪个 .wsgi 文件,如 WSGIScriptAlias 中所定义。

也许它只是寻找/wsgi/application

一些帖子表明最近对 Python 应用程序的结构进行了更改,但它们可能不会影响我的旧版本:

How to change or override openshift.conf in Python 3.3 cartridge

https://blog.openshift.com/openshift-online-march-2014-release-blog/

WSGI Application not found on OpenShift

理想情况下,我试图理解这些文件的执行顺序及其功能:

  • /wsgi/application
  • /wsgi/my-bottle-application
  • setup.py
  • setup.pyc
  • setup.pyo

更新

这表示入口点是wsgi/application:

https://github.com/openshift/origin-server/search?utf8=%E2%9C%93&q=OPENSHIFT_PYTHON_WSGI_APPLICATION

我仍然有兴趣知道上述文件的执行顺序,以及 setup.py 的确切作用以及它是如何执行的——即 中没有对它的引用application 那么它是如何被“调用”的呢?

最佳答案

根据这个你可以设置你的入口点:https://blog.openshift.com/openshift-online-march-2014-release-blog/

python

对于 python 应用程序,我们做了一些类似的更改:

我们摆脱了 wsgi/、wsgi/static/、data/和 libs/目录。您可以使用 wsgi.py 而不是 wsgi/application 作为默认的 WSGI 入口点。我们丢弃了经常与同名上游文件冲突的 README.md 文件。新的 OPENSHIFT_PYTHON_WSGI_APPLICATION 以设置替代 WSGI 入口点。

wsgi.py             WSGI entry-point (configurable by $OPENSHIFT_PYTHON_WSGI_APPLICATION)
setup.py Standard setup.py, specify deps here
.openshift/ Location for OpenShift specific files
action_hooks/ See the Action Hooks documentation
markers/ See the Markers section below

有关 OpenShift Online 环境变量的更多信息:https://developers.openshift.com/en/managing-environment-variables.html

关于python-2.7 - OpenShift Online 上的 Apache mod_wsgi 正在寻找的入口点是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27113430/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com