Closed protonpopsicle closed 10 years ago
don't have this problem when run via SimpleHTTPServer
For whatever reason, the uwsgi_params does not define the standard SCRIPT_NAME variable, presumably to force user to define it.
It seems that others have also run into this: https://bitbucket.org/akorn/wheezy.web/issue/2/keyerror-script_name-nginx-uwsgi
adding:
uwsgi_param SCRIPT_NAME '';
after the include uwsgi_params should fix it for you.
Even though according to PEP 3333, the field should always be defined, there's no harm in changing the key lookup in pywb from:
env['SCRIPT_NAME']
to
env.get('SCRIPT_NAME', '')
to avoid this error altogether in the future.
I'll add that to next release.
great, figured as much. thanks for the quick response!
index page loads fine. tried to hit mydomain.com/pywb/*/example.com
I'm running pywb 0.4.7 (installed w/ pip) via uWSGI behind Nginx.
Nginx server block
contents of uwsgi_params: https://github.com/phusion/nginx/blob/master/conf/uwsgi_params
command to run uWSGI:
$ /usr/local/bin/uwsgi --ini /etc/pywb/wsgi.ini
contents of
/etc/pywb/wsgi.ini
contents of /etc/pywb/config.yaml