#!/bin/bash # serve landing page via uwsgi base=$HOME export PATH="$base/deployment":$PATH ulimit -c $((100 * 1024)) mkdir -p $HOME/sockets # redirect / to index.html, # serve static files from $HOME/auditor exec uwsgi \ --mimefile /etc/mime.types \ --socket $HOME/sockets/auditor.uwsgi \ --chmod-socket=660 \ --route "^/?$ redirect:index.html" \ --route "^/(.+) addvar:FILE=$HOME/auditor/\$1" \ --route-if "exists:\${FILE} static:\${FILE}" \ --route "^/(.+) break:404 not found"