Nodejs not allowing access to refusal

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.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


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.

Look very closely at jtittle1 's answer. I wasted a whole day on this because my ports were misconfigured between localhost, ‘’ and not having any host in my express js server. Instead of

app.listen(port, () =>

it should be

app.listen(port, hostname, ()=>