-
Notifications
You must be signed in to change notification settings - Fork 41
/
nginx.conf
64 lines (52 loc) · 1.43 KB
/
nginx.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
worker_processes 1;
pid /run/nginx.pid;
daemon off;
events {
use epoll;
accept_mutex on;
worker_connections 1024;
}
http {
gzip on;
gzip_comp_level 2;
gzip_min_length 512;
upstream frontends{
server localhost:8880;
server localhost:8881;
}
server_tokens off;
access_log /dev/stdout;
error_log /dev/stdout;
include mime.types;
default_type application/octet-stream;
sendfile on;
# http://wiki.nginx.org/HttpProxyModule#proxy_next_upstream
# Only retry if there was a communication error, not a timeout
# on the Tornado server (to avoid propagating "queries of death"
# to all frontends)
proxy_next_upstream error http_502;
proxy_read_timeout 200;
tcp_nopush on;
tcp_nodelay on;
client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 30;
server {
listen 80;
listen 443 ssl;
server_name _;
keepalive_timeout 5;
client_max_body_size 50M;
ssl_certificate /codecov.crt;
ssl_certificate_key /codecov.key;
location / {
proxy_pass_header Server;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://frontends;
}
}
}