-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnginx.conf
53 lines (44 loc) · 1.74 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
worker_processes 1;
worker_rlimit_nofile 500000;
pid /var/run/nginx.pid;
error_log /dev/stdout info;
events {
use epoll;
worker_connections 500000;
multi_accept on;
}
http {
## -----------------------------------------------------------------------
## Access Logs
## -----------------------------------------------------------------------
access_log /dev/stdout;
## -----------------------------------------------------------------------
## Client SDK keep-alive Settings
## -----------------------------------------------------------------------
keepalive_requests 1000000; ## KEEP
keepalive_timeout 3600; ## KEEP
## -----------------------------------------------------------------------
## Upstreams
## -----------------------------------------------------------------------
upstream pubnub_servers {
server pubsub.pubnub.com:80 max_fails=3;
keepalive 512;
}
## -----------------------------------------------------------------------
## URL Routes
## -----------------------------------------------------------------------
server {
listen 4443 http2 ssl;
listen 8080 http2;
server_name pubnub.com;
ssl_certificate /mnt/certs/pubnubcoin.com.cert;
ssl_certificate_key /mnt/certs/pubnubcoin.com.key;
more_set_headers 'Access-Control-Max-Age: 86400';
more_set_headers 'Access-Control-Allow-Origin: *';
more_set_headers 'Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE';
more_set_headers "Access-Control-Allow-Headers: Authorization, Origin, X-Requested-With, Content-Type, Accept";
location / {
proxy_pass http://pubnub_servers;
}
}
}