forked from saajnn/hipy-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hipy.conf
68 lines (59 loc) · 1.83 KB
/
hipy.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
limit_req_zone $binary_remote_addr zone=hipy_ips:10m rate=100r/s;
limit_conn_zone $binary_remote_addr zone=hipy_addr:10m;
upstream hipy {
server 127.0.0.1:5707 weight=1 fail_timeout=0;
}
upstream hipy_ui {
server 127.0.0.1:8008 weight=1 fail_timeout=0;
}
server{
listen 80;
server_name hipy.xx.com;
location / {
#....
proxy_pass http://localhost:5707;
proxy_next_upstream error timeout invalid_header http_503;
proxy_redirect off;
proxy_read_timeout 300000;
limit_req zone=hipy_ips burst=5 nodelay;
limit_conn hipy_addr 200;
limit_rate 5000k;
# set headers
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
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 https;
}
location ~* /files/drpy_js/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://hipy;
}
##### other directive
}
server{
listen 8008;
server_name hipy.xx.com;
location / {
#....
proxy_pass http://hipy_ui;
proxy_next_upstream error timeout invalid_header http_503;
proxy_redirect off;
proxy_read_timeout 300000;
limit_req zone=hipy_ips burst=5 nodelay;
limit_conn hipy_addr 200;
limit_rate 5000k;
# set headers
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
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 https;
}
}