Strategy to isolate multiple nginx ssl apps with single domain via suburi's?

Posted by icpu on Server Fault See other posts from Server Fault or by icpu
Published on 2012-10-06T17:49:59Z Indexed on 2012/10/06 21:40 UTC
Read the original article Hit count: 167

Filed under:
|
|
|
|

Warning: so far I have only learnt how to use nginx to serve apps with their own domain and server block. But I think its time to dive a little deeper.

To mitigate the need for multiple SSL certificates or expensive wildcard certificates I would like to serve multiple apps (e.g. rails apps, php apps, node.js apps) from one nginx server_name. e.g. rooturl/railsapp rooturl/nodejsapp rooturl/phpshop rooturl/phpblog

I am unsure on ideal strategy. Some examples I have seen and or thought about:

  1. Multiple location rules, this seems to cause conflicts between the individual app config requirements, e.g. differing rewrite and access requirements

  2. Isolated apps by backend internal port, is this possible? Each port routing to its own config? So config is isolated and can be bespoke to app requirements.

  3. Reverse proxy, I am little ignorant of how this works, is this what I need to research? is this actually 2 above? Help online seems to always proxy to another server e.g apache

What is an effective way to isolate config requirements for apps served from a single domain via sub uris?

© Server Fault or respective owner

Related posts about nginx

Related posts about ssl