-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
84 lines (69 loc) · 1.86 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
worker_processes 1;
events {
worker_connections 20000;
}
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;
#
# 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;
}
}
# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}