-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf.example
56 lines (47 loc) · 1.31 KB
/
nginx.conf.example
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
limit_req_zone $binary_remote_addr zone=cgvweb-rate-limit:2m rate=10r/s;
server {
server_name www.cgvweb.com;
return 301 $scheme://cgvweb.com$request_uri;
}
server {
server_name cgvweb.com;
client_max_body_size 26M;
# Client
location / {
# GZIP Config
gzip on;
gzip_vary on;
gzip_proxied no-cache no-store private expired auth;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types application/json application/javascript text/javascript;
gzip_disable "msie6";
proxy_pass http://localhost:8080/;
}
# Admin UI
location /admin {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# API
location /api {
limit_req zone=cgvweb-rate-limit burst=12 delay=8;
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Uploads
location /uploads {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Admin Public Folder
location /admin-res {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}