Here is ready to use Nginx Cartridge for OpenShift PaaS. You will need to use OpenShift Command Line Tool for better control of installation. Apache2 is default web server software for OpenShift PaaS, but here is a special Nginx Cartridge for OpenShift.
Nginx Cartridge for OpenShift PaaS : Source Code and Basics
This Nginx Cartridge for OpenShift PaaS is developed by a developer with a nickname gsterjov :
We recommend to read our OpenShift SSH guide and the linked articles for better understanding of RedHat OpenShift PaaS for the beginners. Actually, if we add as custom app, we will face this error :
Shell command '/sbin/runuser -s /bin/sh name-space -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c4,c615' /bin/sh -c \"/var/lib/openshift/name-space/diy/bin/setup --version 0.1\""' returned an error. rc=1 could not open session
As Apache2 is set to run by default, we need to work from CLI.
Nginx Cartridge for OpenShift PaaS : Converting it To Normal Nginx
Normal Nginx means the way we use on Cloud Server / IaaS. If you look at the command he have used, you will see an url :
This is the OpenShift cartridge reflector. It will automatically rewrite cartridge manifests to include a relevant Source-Url for ease of debugging. To use, we need pass the ‘u’ parameter to the /reflect URI.This should be the URL
You can open it on browser to see the text like file. Instead of this way, we would suggest to use :
- Create a new Openshift “Do-It-Yourself” application
- Clone that repository
- Add a new remote “openshift”
- Run git push –force “openshift” master:master
- SSH into your gear
- Wait for build to get finished (Take ages)
That method is written here :
This, in our opinion is better option.