Menu

Installation

Jake Bruce

Installing NewRadial on a Linux or OSX server machine involves setting up a database management system, a web server and the Node.js interpreter.

If a database management system other than PostGreSQL is used, the functions in the DatabaseWrapper.js module must be changed to interface with that other database.

Our Apache setup uses the following URL rewrite rules in httpd.conf:

ProxyPass       /nodejs                     http://inke.acadiau.ca:3000
ProxyPass       /newradial/resources        http://inke.acadiau.ca:3000/newradial/resources
ProxyPass       /NewRadial/resources        http://inke.acadiau.ca:3000/newradial/resources
ProxyPass       /Newradial/resources        http://inke.acadiau.ca:3000/newradial/resources
ProxyPass       /newRadial/resources        http://inke.acadiau.ca:3000/newradial/resources

ProxyPass       /nodejs-dev                 http://inke.acadiau.ca:3001
ProxyPass       /newradial-dev/resources    http://inke.acadiau.ca:3001/newradial/resources
ProxyPass       /NewRadial-Dev/resources    http://inke.acadiau.ca:3001/newradial/resources
ProxyPass       /NewRadial-dev/resources    http://inke.acadiau.ca:3001/newradial/resources
ProxyPass       /Newradial-dev/resources    http://inke.acadiau.ca:3001/newradial/resources
ProxyPass       /Newradial-Dev/resources    http://inke.acadiau.ca:3001/newradial/resources
ProxyPass       /newradial-Dev/resources    http://inke.acadiau.ca:3001/newradial/resources

The proxy pass directives from /nodejs and /nodejs-dev to a particular port are required to sidestep the Same Origin Policy for AJAX requests on the frontend, by hiding the non-80 port.

In addition to these Apache configurations, our server uses a cron job to rotate newradial/backend/logs/today.log and newradial-dev/backend/logs/today.log to files labeled with their date and delete any log files older than a given age (90 days in our case). The script in the backend/logs directory is called by cron at midnight. This cron job is installed by a Node.js module called node-cron; this should happen automagically.