简体   繁体   中英

Do I need to set up nginx.conf to run node.js?

I currently have a CodeIgniter web app running on Ubuntu with nginx. I just finished writing a node.js server (running on 127.0.0.1:8080) as well that I need to deploy to the same server. I am using upstart and monit to keep the node app running - do I need to do any configuration changes on nginx.conf to make the node app work?

It depends on whether the node needs to be accessed from "the outside world," or from your CI host. If you're using Sockets.IO (or equivalent), then you'll need an nginx reverse proxy configuration to pass the right requests to the node instance (leaving the rest going to CI).

Keep in mind that any port other than 80 can have firewall issues for some people.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM