Setting up node.js on Virtualmin?

7 posts / 0 new
Last post
#1 Mon, 09/22/2014 - 17:54
spyridon

Setting up node.js on Virtualmin?

I tried Googling this and found people talking about a script being implemented for Virtualmin to install node.js... But when I look on the Scripts section I do not see it there?

Could anyone provide some assistance on how to setup node.js on the same server as Virtualmin?

Thanks

Tue, 09/23/2014 - 01:10
andreychek

Howdy,

There are certain Node.js Install Scripts, but those are only available in the Pro version of Virtualmin.

However, it's no problem at all to manually perform a Node.js install.

Have you run into a particular problem in installing the app you're interested in?

-Eric

Tue, 09/23/2014 - 17:52
spyridon

Honestly I'm not sure where to start for the install, because Virtualmin uses Apache, and doesn't node.js require special handling to work alongside Apache?

Tue, 09/23/2014 - 22:01
andreychek

Well, let's start here... what app are you hoping to run under Node.js?

-Eric

Wed, 09/24/2014 - 12:39
spyridon

I'm going to be running an app I am creating myself, which is to be a web-based version of my businesses database & stock management system. Going to be using an undecided web framework for Node.js alongside it but am now in the testing stages to see which is most ideal for this project.

Wed, 09/24/2014 - 14:48
andreychek

Howdy,

Ah, if you were installing an existing app, I was going to direct you to their documentation, as they typically explain how to do all the setup pretty well.

But that's okay, there's some other good docs :-)

Normally, Node.js will run on an alternate port such as 3000... and the key is just to get Apache to proxy certain requests to that port.

In order to install Node.js, if you're using Debian or Ubuntu, there should be an existing package in the repository named "nodejs". You can just install that with apt.

If you're using CentOS, you'd likely need to find a package for it from a third party repository. There's more info here on installing Node.js using a package manager:

https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

From there, the key is to proxy requests to the Node.js process. There's a variety of sites that describe how to do that, one such site is this one here:

http://thatextramile.be/blog/2012/01/hosting-a-node-js-site-through-apache

Wed, 09/24/2014 - 17:05
spyridon

Thanks for the links. I'm using Ubuntu.

I will try those instructions once I am off work!

Topic locked