Run Node.js app forever with ISPconfig or Virtualmin
This will install Node.JS Express application and run it forever on port 80 alongside with other VirtualHost on a box with Apache and ISPconfig or Virtualmin.
Install MongoDB
$> sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 $> echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list $> sudo apt-get install -y mongodb-org $> sudo service mongod [stop,start,restart]
Note: Mongodb is available as a Bootup module in Virtualmin. Navigate to "Webmin > System > Bootup and Shutdown".
Install Node.JS
There is a dedicated post for Installing Node.JS on Debian for this step.
Run Node.JS forever
$> forever start -c "npm start" ./
The above is for an npm Express server.
For more information on forever check it's homepage https://github.com/foreverjs/forever
Now your app will be available at
http://yourdomain.com:3000
Setup reverse proxy
This step will allow you to get rid of the :3000 port number
(...) ProxyRequests off Order deny,allow Allow from allProxyPass http://127.0.0.1:3000/ ProxyPassReverse http://127.0.0.1:3000/ |
$> sudo service apache2 restart
#or
$> service httpd restart
References
https://gist.github.com/x-Code-x/2562576#file-readme_install_node-L25
http://quellcodeschmie.de/install-ghost-blog-on-a-server-with-ispconfig/
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/
http://kvcrawford.github.io/blog/2013/11/20/configuring-a-production-node-js-and-mongodb-environment-in-ubuntu-on-an-amazon-ec2-instance/
Recent Comments