Nodejs not allowing access to refusal

May 25, 2017 7.1k views
Server Optimization Ubuntu 16.04

Hello community,

I had a pre server install nodejs and npm after. I hand installed a lamp server on it. But I would like to run apps which require node.js

Would like to access to it will not load anything.

Any ideas how I can get this to work correctly? using socket.IO chat.

3 Answers


It really depends on what IP you’re using to start the server for the app.

If you use localhost or, you won’t be able to access the app via port using your domain as only local access is being permitted.

You’d need to use as the IP, or configure Apache to proxy all requests on port 80 to the local address and port your running the application on.

by Brennen Bearnes
Node.js is an open source JavaScript runtime environment for easily building server-side and networking applications. Node.js applications can be run at the command line but this guide focuses on running them as a service using PM2, so that they will automatically restart on reboot or failure, and can safely be used in a production environment.
  • @peopleandchat

    The last part “Set Up Nginx as a Reverse Proxy Server” would mean that all visitors would talk to Nginx, which would then connect to Node.js in the backend.

    This can be done with Apache as well, if that’s what you’re using. DigitalOcean doesn’t have a tutorial specifically for that, but there’s a tutorial here, which uses port 8080, so you just have to use port 3000 instead:

Have another answer? Share your knowledge.