-
Notifications
You must be signed in to change notification settings - Fork 20
/
nginx.conf.template
48 lines (38 loc) · 1.52 KB
/
nginx.conf.template
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
38
39
40
41
42
43
44
45
46
47
48
worker_processes 1;
pid /run/nginx.pid;
daemon off;
error_log stderr info;
events { worker_connections 1024; }
http {
sendfile on;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen ${SSL_PORT} ssl;
client_max_body_size ${CLIENT_MAX_BODY_SIZE};
ssl_certificate /etc/nginx/certs/cert.pem;
ssl_certificate_key /etc/nginx/certs/key.pem;
error_page 497 301 =307 https://${SERVER_NAME}:${SSL_PORT}$request_uri;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location / {
proxy_pass ${TARGET_SCHEME}://${TARGET_HOST}:${TARGET_PORT};
proxy_http_version 1.1;
proxy_set_header Host ${TARGET_HOST_HEADER};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host ${TARGET_FORWARDED_HOST_HEADER};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
}
}