-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_cp.conf
56 lines (45 loc) · 1.39 KB
/
nginx_cp.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
upstream cp_tornado {
server 127.0.0.1:5000;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
# listen 443;
server_name cplocal;
client_max_body_size 2M;
keepalive_timeout 15;
gzip on;
gzip_vary on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
location / {
proxy_redirect off;
proxy_http_version 1.1;
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-Protocol $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://cp_tornado;
}
location /static/ {
root /home/www/cp/cp/presentation;
access_log off;
log_not_found off;
expires 12h;
}
location /uploads/ {
root /home/www/cp/cp;
access_log off;
log_not_found off;
expires 12h;
}
location /favicon.ico {
return 404;
access_log off;
log_not_found off;
}
}