# This needs to be included in a server{}-block. # The basic-auth-file can be generated using `htpass -c file username`. location /purl.cgi { auth_basic "purl"; auth_basic_user_file /etc/nginx/htpasswd/purl; fastcgi_split_path_info ^(/)(.*); fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_pass unix:/run/fcgiwrap.socket; fastcgi_param SCRIPT_FILENAME /usr/local/lib/purl/cgi/form; fastcgi_param REMOTE_USER $remote_user; include fastcgi_params; } location @redirect { fastcgi_split_path_info ^(/)(.*); fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_pass unix:/run/fcgiwrap.socket; fastcgi_param SCRIPT_FILENAME /usr/local/lib/purl/cgi/redirect; include fastcgi_params; }