1
0
Fork 0
mirror of https://gitlab.com/hagrid-keyserver/hagrid.git synced 2023-02-13 20:55:02 -05:00
hagrid-keyserver--hagrid/nginx.conf
Justus Winter 36c06e036a
Shorten fingerprint to fpr in the Filesystem db.
- This keeps relative links below 60 bytes, allowing ext4 to store
    the link in the inode itself.
2019-02-22 16:17:20 +01:00

58 lines
1.2 KiB
Nginx Configuration File

error_log stderr;
pid nginx/nginx.pid;
daemon off;
http {
# allow 6 requests per min -> one each 10s on avg.
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=6r/m;
server {
listen 127.0.0.1:8090;
access_log nginx/access_log;
include /etc/nginx/mime.types;
default_type application/octet-stream;
root dist/public;
location /by-email/ {
rewrite ^/by-email/([^/][^/])(..*)$ /by-email/$1/$2 break;
default_type application/pgp-keys;
try_files /$uri =404;
}
location /by-fingerprint/ {
rewrite ^/by-fingerprint/([^/][^/])(..*)$ $1/$2 break;
default_type application/pgp-keys;
try_files /by-fpr/$uri =404;
}
location /by-keyid/ {
rewrite ^/by-keyid/([^/][^/])(.*)$ /by-keyid/$1/$2 break;
default_type application/pgp-keys;
try_files /$uri =404;
}
location = / {
proxy_pass http://127.0.0.1:8080;
}
location ^~ /vks/ {
proxy_pass http://127.0.0.1:8080;
}
location ^~ /pks/add {
limit_req zone=mylimit;
proxy_pass http://127.0.0.1:8080;
}
location ^~ /pks/ {
proxy_pass http://127.0.0.1:8080;
}
}
}
events {
worker_connections 4096;
}