Currently only the first process in .awsbox.json processes is mapped to port 80(iptable 80 -> 8080 and then node-http-proxy listens on 8080 using process.env.PORT=10000 to proxy you app)...
Can you suggest a way so i can run many applications like:
or at least listening on different ports like:
example.com:8001 //for admin
example.com:8002 // for static content
I'm not sure if this is the right place to ask.. i hope so
What i came up with is replacing proxy_server.js with this:
What i can suggest is instead of using just the processes array we can use a http-proxy ProxyTable and load it in proxy_server.js ... but i don't know how the ssl thing is gonna work
I do a similar thing in my proximity project whereby multiple domains listen on the same port and are proxied through.
So I'll look into this soon I hope.
On the subject of https, I believe it can be done though it'll depend on SNI being ok with the client (some compatibility stuff here http://en.wikipedia.org/wiki/Server_Name_Indication). Again, I think it's possible to add so I'll take a look. :)
now that we've moved to nginx, what do we think about this issue?
I think it sounds like a great feature and much easier with Nginx.
From what I can tell, we loop through the config.processes for each server process we want to start, but this seems to be independent from anything related to Nginx and in fact, independent of services that might be listening externally. Correct me if I'm wrong.
Am I right in thinking that we don't do anything to the Nginx config in users/app/post-update.js (and is it just already set up on the AMI)? I guess we would write a new Nginx server config to sites-available/enabled from post-update.js. This doesn't seem to be a one-to-one mapping of processes, so would we require a new config option, such as hosts or servers or public-processes ... just mashing things out of my head. Thoughts?