44 lines
1.3 KiB
Nginx Configuration File
44 lines
1.3 KiB
Nginx Configuration File
pid /tmp/nginx.pid;
|
|
events { worker_connections 1024; }
|
|
http {
|
|
log_format safe_access '$request_method $status $request_time';
|
|
access_log /dev/stdout safe_access;
|
|
client_body_temp_path /tmp/client_body;
|
|
proxy_temp_path /tmp/proxy;
|
|
fastcgi_temp_path /tmp/fastcgi;
|
|
uwsgi_temp_path /tmp/uwsgi;
|
|
scgi_temp_path /tmp/scgi;
|
|
error_log /dev/stderr warn;
|
|
resolver 127.0.0.11 valid=2s ipv6=off;
|
|
upstream api_backends {
|
|
zone api_backends 64k;
|
|
server api:8080 resolve max_fails=0;
|
|
keepalive 16;
|
|
}
|
|
server {
|
|
listen 8443 ssl;
|
|
ssl_certificate /pki/lb.crt;
|
|
ssl_certificate_key /pki/lb.key;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
client_max_body_size 11m;
|
|
location / {
|
|
proxy_pass https://api_backends;
|
|
proxy_ssl_certificate /pki/lb.crt;
|
|
proxy_ssl_certificate_key /pki/lb.key;
|
|
proxy_ssl_trusted_certificate /pki/ca.crt;
|
|
proxy_ssl_verify on;
|
|
proxy_ssl_server_name on;
|
|
proxy_ssl_name api;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header Host $host;
|
|
proxy_connect_timeout 1s;
|
|
proxy_read_timeout 12s;
|
|
proxy_send_timeout 12s;
|
|
proxy_next_upstream error timeout http_502 http_503 http_504;
|
|
proxy_next_upstream_tries 2;
|
|
# POST is not transparently retried: client uses Idempotency-Key.
|
|
}
|
|
}
|
|
}
|