aboutsummaryrefslogtreecommitdiffstats
path: root/nginx.conf
blob: 5a1c5e312de871a28143c79a6273b9334e848aac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    # This needs to be included in a server{}-block.
    # The basic-auth-file can be generated using `htpass -c file username`.

    location /form {
        auth_basic "purl-rs";
        auth_basic_user_file /htpasswd/purl-rs;
        
        include fastcgi_params;
        fastcgi_split_path_info ^(/)(.*);
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param SCRIPT_FILENAME /cgi-bin/purl-rs/purl-rs;
        fastcgi_param REMOTE_USER $remote_user;
        fastcgi_pass unix:/run/slowcgi.sock;
    }

    location /create {
        auth_basic "purl-rs";
        auth_basic_user_file /htpasswd/purl-rs;
        
        include fastcgi_params;
        fastcgi_split_path_info ^(/)(.*);
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param SCRIPT_FILENAME /cgi-bin/purl-rs/purl-rs;
        fastcgi_param REMOTE_USER $remote_user;
        fastcgi_pass unix:/run/slowcgi.sock;
    }

    location ~ ^/\+[a-zA-Z0-9_-]+$ {
        include fastcgi_params;
        fastcgi_split_path_info ^(/)(.*);
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param SCRIPT_FILENAME /cgi-bin/purl-rs/purl-rs;
        fastcgi_pass unix:/run/slowcgi.sock;
    }