如何在OpenShift上安装Nginx [英] How to install Nginx on OpenShift

查看:366
本文介绍了如何在OpenShift上安装Nginx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管我遵循了 https://blog.openshift. com/lightweight-http-serving-using-nginx-on-openshift/一步一步,最终出现错误503,告诉我服务不可用.在各种网站上都有问题,包括stackoverflow,但所有问题都与成功安装nginx之后 有关,我还没有想到这一点.

Though I followed https://blog.openshift.com/lightweight-http-serving-using-nginx-on-openshift/ step by step, I ended up getting the error 503, telling me service is unavailable. There are questions on various websites, including stackoverflow, but all of them are about issues after a successful installation of nginx, a point I haven't arrived at yet.

我不想使用已经可用的墨盒-部分原因是大多数墨盒都已过时.此外,某些人可能会对我的问题的答案感兴趣,因为它将教您如何始终在OpenShift上运行最新的nginx服务器.

I don't want to use already available cartridges - in part because most of them are out-of-date. Also, an answer to my question might be of interest to some people, inasmuch as it will teach how to run always the latest nginx server on OpenShift.

这是rhc tail结果

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

推荐答案

本指南(2012年)使用环境变量:$ OPENSHIFT_INTERNAL_IP:$ OPENSHIFT_INTERNAL_PORT

This guide (2012 year) uses environment variables: $OPENSHIFT_INTERNAL_IP:$OPENSHIFT_INTERNAL_PORT

现在将其重命名为:
$ OPENSHIFT_DIY_IP:$ OPENSHIFT_DIY_PORT

Now it was renamed to:
$OPENSHIFT_DIY_IP:$OPENSHIFT_DIY_PORT

这篇关于如何在OpenShift上安装Nginx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆