This guide (2012 year) uses environment variables: $OPENSHIFT_INTERNAL_IP:$OPENSHIFT_INTERNAL_PORT
Now it was renamed to:$OPENSHIFT_DIY_IP:$OPENSHIFT_DIY_PORT
If all you want is nginx on OpenShift I would use this cartridge instead
https://github.com/gsterjov/openshift-nginx-cartridge
Here's a cartridge that's updated to the most recent nginx 1.9.12