I have my nodejs hosted in ElastiCbean stalk environment. It uses the default configurations and default port. Now I am planning to open another port and listen to that port from Nodejs applicaiton. This is kind of opening nodejs in mutliple ports.
I have done the nodejs coding part.But i am not sure of the nginx changes to make it to listen to multiple ports. Can someone explain it to me?
I've only configured nginx for Java backends, but essentially you will need to configure the
serverdirective to include the additional port you want to listen on, such as:So I recommend ssh on to your Nodejs EB server and fish around for your nginx config directories, looking for
nginx,conf.dfolders, or annginx.conffile. When you find it, you can override the defaultserverconfig, or apply anincludestatement to extend it, either way theserverdirective above should allow access on multiple ports as far as nginx is concerned.