-
Notifications
You must be signed in to change notification settings - Fork 244
/
Copy pathnginx-https.conf
37 lines (28 loc) · 1.07 KB
/
nginx-https.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# perf: define how many processes can be used ('auto' for one per core, doesn't work on docker)
worker_processes WORKER_PROCESSES;
events {
# perf: ensures that each worker accepts as many connections as possible
multi_accept on;
worker_connections 1024;
use epoll;
}
http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
upstream backend {
server DOWNSTREAM_ADDRESS:DOWNSTREAM_PORT;
keepalive 1024; # more than twice the number of client connections, since warmup will already reserve a set
}
server {
listen 8080 ssl;
ssl_certificate /etc/ssl/certs/testCert.crt;
ssl_certificate_key /etc/ssl/private/testCert.rsa;
server_name _;
access_log off;
error_log stdout info;
location / {
proxy_pass DOWNSTREAM_SCHEME://backend;
proxy_http_version 1.1;
proxy_set_header Connection ""; # Remove the Connection header if the client sends it, we don't want to close the upstream connection
}
}
}