1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 08:04:49 +01:00
pywb/run.sh
Ilya Kreymer 80b2585d22 Should resolve #4 -- supports pywb running as a non-root app
* Instead of relying on REQUEST_URI, pywb constructs a
REL_REQUEST_URI, from PATH_INFO + QUERY_STRING.
SCRIPT_NAME auto-added to prefix
* MatchPrefix is now superceded by MatchRegex, which
can match a plain string -- collId defaults to the full match
* Added optional archivalurl_class to router to allow for customized
ArchivalUrl implementations to be specified
* run.sh can test on a non-root mountpoint, eg. ./run.sh "/approot"
2014-01-19 21:13:48 -08:00

19 lines
393 B
Bash
Executable File

#!/bin/sh
mypath=$(cd `dirname $0` && pwd)
app=$2
cd $mypath/pywb
if [ -z "$app" ]; then
app=wbapp.py
fi
if [ -z "$1" ]; then
# Standard root config
uwsgi --static-map /static=$mypath/static --http-socket :8080 --wsgi-file $app
else
# Test on non-root mount
uwsgi --static-map /static=$mypath/static --http-socket :8080 --mount "$1=$app" --no-default-app --manage-script-name
fi