The major
problem in hosting in in-house environment NodeJs application servers
are the configuration of ports. The possible solution to host
multiple NodeJs applications on the same system is reverse proxies.
One of the major reverse proxy used for NodeJs hosting set-up is
Nginx.
Apache also
can be used as a reverse proxy for NodeJs applications.
After Apache
installation, the site configuration file need to be modified to
enable the reverse proxy.
The apache
site configuration file 000-default.conf can be found in
/etc/apache2/sites-enabled directory.
The first set-up is to add the necessary module file to enable proxy.
After the
module setup the virtual host can be set. It would be preferable to
use multiple subdomain for multiple NodeJs application for better
proxy settings.
The following virtual host set-up enables all the 3 types of transports used by socket.io (http, xhr-polling, ws)
Now, restart your apache using /etc/init.d/apache2 restart


No comments:
Post a Comment