aboutsummaryrefslogtreecommitdiffstats
path: root/nginx.conf
blob: 4e1fee7ced7791e44fd80c95236ccbbe25eff457 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
    # 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;
    }