blob: 7a5902f69b671dc7c094e36e4c593f6d52613911 (
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/demo/\$1" \
--route-if "exists:\${FILE} static:\${FILE}" \
--route "^/(.+) break:404 not found"
|