1

context

I've a running app on Openshift using a nodejs (nodejs-0.10). I would like to add a ngix as first proxy to serve static files only.

problem

The question is how to add nginx to a running app on Openshift. I saw this cartridge gsterjov/openshift-nginx-cartridge but the README instructs how to create a new app using the nginx, but not how to add it to an existing app.

a--m
  • 4,716
  • 1
  • 39
  • 59

1 Answers1

2

You can not add a secondary web framework cartridge to an application. Each application can only have one web framework cartridge installed at a time. You might need to setup a second application and setup nginx as a proxy if you want the requests to hit that first and serve static assets, then proxy the dynamic requests back to your node.js application.

  • thank you @coreydaley, I understand your point. But is that the same to say that it's not possible to have nginx and nodejs in the same application using openshift? – a--m Sep 21 '15 at 16:55
  • Yes. There would not be a way to expose both application at the same time. –  Sep 21 '15 at 17:05
  • Possibly this modulus.io analogy helps: http://blog.modulus.io/supercharge-your-nodejs-applications-with-nginx – Saran Oct 25 '15 at 08:25