Web Portal Install


The mortar web app is directly hosted by https://www.nginx.com/resources/wiki/. To install nginx it is possible to use most package managers or to build from source.

For dependency management the mortar website uses Bower. Bower requires NPM (node package manager). For more information about Bower visit https://bower.io. After node is installed, install bower with:

apt-get install npm
npm install -g bower

Note that it may be necessary to install nodes-legacy depending on your system.

Installing the MIO Web Portal

The first step to installing the web portal is to download the code from code. Set the permissions

chmod -R 755  [nginx_user]:[nginx_group] 

Once this is done edit the nginx configuration to server this content.

user _www;
#user nobody;
worker_processes  1;

#error_log  /opt/local/var/log/nginx/nginx-error.log;
#error_log  /opt/local/var/logs/nginx/error.log  notice;
#error_log  /opt/local/var/logs/nginx/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;

        root /Workspace/sensorportal/mortar-io/public/;
        index index.html index.htm; 

        charset utf-8;

        location / {
            try_files $uri $uri/ =404;
            autoindex on;

        location /RPC2 {
             proxy_pass http://sensor.andrew.cmu.edu:4560/RPC2;

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        error_page   500 502 503 504  error/50x.html;

        location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }

        sendfile off; 

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        location ~ /\.ht {
            deny  all;

Configuring https