summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-landing
blob: 85010f36e17810f3cf64b21fe1f03c3d5d7bb956 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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/landing
exec uwsgi \
  --mimefile /etc/mime.types \
  --socket $HOME/sockets/landing.uwsgi \
  --chmod-socket=660 \
  --route "^/?$ redirect:index.html"  \
  --route "^/(.+) addvar:FILE=$HOME/landing/\$1"  \
  --route-if "exists:\${FILE} static:\${FILE}"  \
  --route "^/(.+) break:404 not found"