aboutsummaryrefslogtreecommitdiffstats
path: root/nginx.conf
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2019-11-01 13:31:38 +0100
committerDennis Eriksen <d@ennis.no>2019-11-01 13:31:38 +0100
commit2dd3a24d39e35cfe398685c4abdfd9bb85dc2a0c (patch)
tree87ca733a8355a5e173026fdd3e906dc021e027a6 /nginx.conf
downloadpurl-2dd3a24d39e35cfe398685c4abdfd9bb85dc2a0c.tar.gz
Initial commit
Diffstat (limited to '')
-rw-r--r--nginx.conf22
1 files changed, 22 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..4e1fee7
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,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;
+ }