aboutsummaryrefslogblamecommitdiffstats
path: root/nginx.conf
blob: 5a1c5e312de871a28143c79a6273b9334e848aac (plain) (tree)


































                                                                           
    # 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;
    }