Apache mod_wsgi在OpenShift Online上寻找的切入点是什么?

use*_*287 2 mod-wsgi python-2.7 openshift

我有一个OpenShift Python 2.7我猜测用的应用程序mod_wsgi.

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

/etc/apache2/sites-available/
Run Code Online (Sandbox Code Playgroud)

我想看看.wsgiApache在WSGIScriptAlias中定义的文件.

也许它只是寻找/wsgi/application

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

如何在Python 3.3盒中更改或覆盖openshift.conf

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

在OpenShift上找不到WSGI应用程序

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

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

UPDATE

这表明入口点是wsgi/application:

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

我仍然有兴趣了解上述文件的执行顺序以及它执行的确切内容setup.py和方式 - 即没有对它的引用,application所以如何"调用"?

小智 5

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

蟒蛇

对于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
Run Code Online (Sandbox Code Playgroud)

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