forked from observing/balancerbattle
/
nginx.ssl.conf
80 lines (67 loc) · 2 KB
/
nginx.ssl.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
worker_processes 1;
worker_priority -1;
worker_rlimit_nofile 90000;
events {
worker_connections 20000;
multi_accept on;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
#
# Some default configuration.
#
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
#
# A list with load balancing backends hashed on IP for sticky load balancing.
#
upstream realtime {
ip_hash;
server 10.112.1.62:8080;
}
server {
listen 8082;
server_name localhost;
ssl on;
ssl_certificate /root/balancerbattle/ssl/server.crt;
ssl_certificate_key /root/balancerbattle/ssl/server.key;
ssl_session_timeout 10m;
#
# Correctly configure the ssl_ciphers so it uses RC4
#
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers RC4-SHA:AES128-SHA:AES:!ADH:!aNULL:!DH:!EDH:!eNULL;
ssl_session_cache shared:TLSSL:100m;
ssl_prefer_server_ciphers on;
#
# Proxy settings
#
location / {
proxy_pass http://realtime/;
proxy_redirect off;
proxy_set_header Host $host;
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;
# WebSocket specific
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#
# Specific for comet or long running HTTP requests, don't buffer up the
# response from origin servers but send them directly to the client.
#
proxy_buffering off;
#
# Bump the timeout's so someting sensible so our connections don't
# disconnect automatically. We've set it to 12 hours.
#
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;
}
}
}