From 2417909cd35c6f4b0cb0de8797d427b4b25f5f12 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 21 Nov 2016 22:14:23 +0100 Subject: landing uwsgi: route relative to script_name --- bin/taler-deployment-landing | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bin/taler-deployment-landing') diff --git a/bin/taler-deployment-landing b/bin/taler-deployment-landing index 388ddae..0a51d2e 100755 --- a/bin/taler-deployment-landing +++ b/bin/taler-deployment-landing @@ -10,9 +10,13 @@ ulimit -c $((100 * 1024)) mkdir -p $HOME/sockets + +# redirect / to index.html, +# serve static files from $HOME/landing exec uwsgi \ --socket $HOME/sockets/landing.uwsgi \ --chmod-socket=660 \ - --route "^(.+) static: $HOME/landing/\$1" \ - --error-route-status '500 return:404 Not Found' - + --route "^/?$ redirect:index.html" \ + --route "^(.+) addvar:FILE=$HOME/landing/\$1" \ + --route-if "exists:\${FILE} static:\${FILE}" \ + --route "^(.+) break:404 not found" -- cgit v1.2.3