-
Notifications
You must be signed in to change notification settings - Fork 0
/
volekino.conf
88 lines (67 loc) · 2.36 KB
/
volekino.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
85
86
87
88
#proxy_cache_path /tmp/nginx-cache keys_zone=main:10m max_size=250m inactive=24h use_temp_path=off;
#proxy_cache_key $request_uri;
#user nobody; [45/1804]
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
proxy_cache_path /tmp/nginx-cache keys_zone=main:10m max_size=${PROXY_CACHE_MAX_SIZE} inactive=24h use_temp_path=off;
server {
root /var/www/html;
error_log /var/log/debug.log debug;
#server_name volekino.abreidenbach.com;
location = /rpc {
proxy_pass http://localhost:12990;
}
location ~ .*\.woff(2)? {
add_header Cache-Control "max-age=31556952, public";
try_files $uri =404;
}
location / {
try_files $uri =404;
}
# location ~ /v/(?<socket>\w+)/api/(?<path>.*) {
#add_header X-Cache-Status $upstream_cache_status;
#proxy_cache_key $request_uri;
# proxy_pass http://unix:/tmp/$socket:/api/$path;
#proxy_cache main;
#proxy_cache_use_stale error timeout updating http_500 http_502
# http_503 http_504;
# }
location ~ /v/(?<socket>\w+)/ws/(?<path>.*) {
proxy_pass http://unix:/tmp/$socket:/ws/$path;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location ~ /v/(?<socket>\w+)(?<path>.*) {
add_header X-Cache-Status $upstream_cache_status;
slice ${SLICE_SIZE};
proxy_cache_key $request_uri$slice_range;
proxy_set_header Range $slice_range;
proxy_http_version 1.1;
proxy_pass http://unix:/tmp/$socket:/$path;
proxy_cache main;
proxy_cache_use_stale error timeout updating http_500 http_502
http_503 http_504;
}
listen 80;
include /usr/local/nginx/server_includes/*.conf;
}
}