尽管我一步一步地遵循了https://blog.openshift.com/lightweight-http-serving-using-nginx-on-openshift/,但最终还是得到了错误503,告诉我服务不可用.在各种网站上都有问题,包括stackoverflow,但是所有问题都与成功安装Nginx之后的问题有关,我还没有想到这一点.
我不想使用已经可用的墨盒-部分原因是大多数墨盒都已过时.此外,某些人可能会对我的问题的答案感兴趣,因为它将教您如何始终在OpenShift上运行最新的Nginx服务器.
这是rhc的结果
DL is deprecated,please use Fiddle
==> app-root/logs/diy.log <==
[2014-12-06 16:55:47] INFO WEBrick::HTTPServer#start done.
[2014-12-06 16:55:50] INFO WEBrick 1.3.1
[2014-12-06 16:55:50] INFO ruby 1.8.7 (2013-06-27) [x86_64-linux]
[2014-12-06 16:55:50] INFO WEBrick::HTTPServer#start: pid=255959 port=8080
127.xx.x.xxx - - [06/Dec/2014:17:11:57 EST] "HEAD / HTTP/1.1" 200 0
- -> /
127.xx.x.xxx - - [06/Dec/2014:17:11:57 EST] "HEAD / HTTP/1.1" 200 0
- -> /
[2014-12-06 17:32:02] INFO going to shutdown ...
[2014-12-06 17:32:02] INFO WEBrick::HTTPServer#start done.
==> app-root/logs/server.log <==
Nginx: [emerg] invalid port in ":" of the "listen" directive in /var/lib/openshi
ft/xxx/app-root/data//conf/Nginx.conf:36
@H_404_13@
最佳答案@H_404_13@
本指南(2012年)使用环境变量:$OPENSHIFT_INTERNAL_IP:$OPENSHIFT_INTERNAL_PORT