2020-12-04 18:40:58 -08:00
|
|
|
# nginx config for running under /wayback/ prefix
|
|
|
|
|
2021-05-18 20:09:18 -07:00
|
|
|
|
|
|
|
# set acl_user, defaulting to empty (any public user)
|
|
|
|
geo $acl_user {
|
|
|
|
# ensure user is set to empty by default
|
|
|
|
default "";
|
|
|
|
|
|
|
|
# optional: add IP ranges to allow privileged access
|
|
|
|
127.0.0.1 "staff";
|
|
|
|
192.168.0.0/24 "staff";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-04 18:40:58 -08:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
|
|
|
|
# optinal: optimization to have nginx serve static assets
|
|
|
|
location /wayback/static {
|
|
|
|
alias /pywb/pywb/static;
|
|
|
|
}
|
|
|
|
|
|
|
|
# required: pywb with prefix
|
|
|
|
location /wayback/ {
|
|
|
|
resolver 127.0.0.1;
|
|
|
|
|
|
|
|
uwsgi_pass pywb:8081;
|
2022-08-08 16:18:01 -04:00
|
|
|
uwsgi_buffer_size 8k;
|
2020-12-04 18:40:58 -08:00
|
|
|
|
2021-05-18 20:09:18 -07:00
|
|
|
|
2020-12-04 18:40:58 -08:00
|
|
|
include uwsgi_params;
|
|
|
|
uwsgi_param UWSGI_SCHEME $scheme;
|
2021-05-18 20:09:18 -07:00
|
|
|
|
|
|
|
# pass acl_user (which should be empty by default)
|
|
|
|
uwsgi_param HTTP_X_PYWB_ACL_USER $acl_user;
|
2020-12-04 18:40:58 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|