2018-10-25 11:38:49 -04:00
|
|
|
error_log stderr;
|
|
|
|
pid nginx/nginx.pid;
|
|
|
|
daemon off;
|
|
|
|
|
|
|
|
http {
|
2019-01-15 11:25:53 -05:00
|
|
|
# allow 6 requests per min -> one each 10s on avg.
|
|
|
|
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=6r/m;
|
|
|
|
|
2018-10-25 11:38:49 -04:00
|
|
|
server {
|
|
|
|
listen 127.0.0.1:8090;
|
|
|
|
|
|
|
|
access_log nginx/access_log;
|
|
|
|
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
2018-11-02 06:48:02 -04:00
|
|
|
root dist/public;
|
2018-10-25 11:38:49 -04:00
|
|
|
|
2019-02-21 18:29:15 -05:00
|
|
|
location /by-email/ {
|
|
|
|
rewrite ^/by-email/([^/][^/])(..*)$ /by-email/$1/$2 break;
|
2018-10-25 11:38:49 -04:00
|
|
|
default_type application/pgp-keys;
|
2019-02-21 18:29:15 -05:00
|
|
|
try_files /$uri =404;
|
2018-10-25 11:38:49 -04:00
|
|
|
}
|
|
|
|
|
2019-02-21 18:29:15 -05:00
|
|
|
location /by-fingerprint/ {
|
2019-02-22 10:08:52 -05:00
|
|
|
rewrite ^/by-fingerprint/([^/][^/])(..*)$ $1/$2 break;
|
2018-11-02 06:48:02 -04:00
|
|
|
default_type application/pgp-keys;
|
2019-02-22 10:08:52 -05:00
|
|
|
try_files /by-fpr/$uri =404;
|
2018-11-02 06:48:02 -04:00
|
|
|
}
|
|
|
|
|
2019-02-21 18:29:15 -05:00
|
|
|
location /by-keyid/ {
|
|
|
|
rewrite ^/by-keyid/([^/][^/])(.*)$ /by-keyid/$1/$2 break;
|
2019-01-04 08:07:14 -05:00
|
|
|
default_type application/pgp-keys;
|
2019-02-21 18:29:15 -05:00
|
|
|
try_files /$uri =404;
|
2019-01-04 08:07:14 -05:00
|
|
|
}
|
|
|
|
|
2018-11-02 06:48:02 -04:00
|
|
|
location = / {
|
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ^~ /vks/ {
|
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
|
|
}
|
|
|
|
|
2019-01-15 11:25:53 -05:00
|
|
|
location ^~ /pks/add {
|
|
|
|
limit_req zone=mylimit;
|
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
|
|
}
|
|
|
|
|
2018-11-02 06:48:02 -04:00
|
|
|
location ^~ /pks/ {
|
2018-10-25 11:38:49 -04:00
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 4096;
|
|
|
|
}
|