SECexplorer is a web interface to the R package SECprofiler.
This project consists of two parts:
-
The
client/
folder contains a javascript-based frontend making use of the framework angularjs. -
A
server/
folder holds Python code for the backend server based on flask. Further the backend usesrpy2
to execute the functions from theSECprofiler
R package.
The only role of apache in this setting is to run the backend, the frontend on port 443 is served by client/start_nodejs_for_frontend script.
When we open a web browser and request http://sec-explorer.ethz.ch
we
communicate with a nodejs
web server listening on port 443. This server is
configured and setup in the client
folder.
Currently this web server only serves the
The clients javascript code requests the functions from the R
pacakge
SECprofiler
by accessing the backend server who offers a web service on the
URL http://127.0.0.1:8020/app
.
This backend Python server is implemented with flask
. Apache listens on port
8020 and forwards requests to the app.wsgi
script using the apache module
mod_wsgi
.
First read the client/README.md
file for installing nodejs
and the
requires javascript packages.
Furter check the installation instructions in the SECprofiler
package. This
R
package must be accesssible by rpy2
within the Python backend.
We implemented a unit file sec_explorer.server
for systemd
for proper
startup and shutdown of this processes. More details below.
The following instructions where developed and tested on Ubuntu 16.04.1 LTS
.
They should work for new versions as well, but might break on older versions as
systemd
was not default system manager before Ubuntu 15.04
.
To install the sec_explorer.service
file and to configure apache we assume
that your current working directory is the one holding this README.md
file.
Then run:
$ sudo ln -s $(pwd)/sec_explorer.service /lib/systemd/system
$ sudo ln -s $(pwd)/for_apache.conf /etc/apache2/conf-enabled/sec-explorer.conf
$ sudo systemctl enable sec_explorer.service
In case you edit the sec_explorer.service
file you first have to reload it:
$ sudo systemctl daemon-reload
$ sudo systemctl start sec_explorer.service
If this fails or in case you need more information about the status of the involved processes run
$ sudo systemctl status sec_explorer.service apache2.service
$ sudo systemctl stop sec_explorer.service