summaryrefslogtreecommitdiff
path: root/configs/nginx/kvmd.ctx-server.conf
blob: e8dd024e7ee857b62aeda352d25d94b090bb2909 (plain)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
absolute_redirect off;

index index.html;

auth_request /auth_check;

location = /auth_check {
	internal;
	proxy_pass http://kvmd/auth/check;
	proxy_pass_request_body off;
	proxy_set_header Content-Length "";
	auth_request off;
}

location / {
	root /usr/share/kvmd/web;
	include /etc/kvmd/nginx/loc-login.conf;
	include /etc/kvmd/nginx/loc-nocache.conf;
}

location @login {
	return 302 /login;
}

location /login {
	root /usr/share/kvmd/web;
	auth_request off;
}

location /share {
	root /usr/share/kvmd/web;
	include /etc/kvmd/nginx/loc-nocache.conf;
	auth_request off;
}

location /share/css/user.css {
	alias /etc/kvmd/web.css;
	auth_request off;
}

location = /favicon.ico {
	alias /usr/share/kvmd/web/favicon.ico;
	include /etc/kvmd/nginx/loc-nocache.conf;
	auth_request off;
}

location = /robots.txt {
	alias /usr/share/kvmd/web/robots.txt;
	include /etc/kvmd/nginx/loc-nocache.conf;
	auth_request off;
}

location /api/ws {
	rewrite ^/api/ws$ /ws break;
	rewrite ^/api/ws\?(.*)$ /ws?$1 break;
	proxy_pass http://kvmd;
	include /etc/kvmd/nginx/loc-proxy.conf;
	include /etc/kvmd/nginx/loc-websocket.conf;
	auth_request off;
}

location /api/msd/write {
	rewrite ^/api/msd/write$ /msd/write break;
	rewrite ^/api/msd/write\?(.*)$ /msd/write?$1 break;
	proxy_pass http://kvmd;
	include /etc/kvmd/nginx/loc-proxy.conf;
	limit_rate 6250k;
	limit_rate_after 50k;
	client_max_body_size 0;
	proxy_request_buffering off;
	auth_request off;
}

location /api/log {
	rewrite ^/api/log$ /log break;
	rewrite ^/api/log\?(.*)$ /log?$1 break;
	proxy_pass http://kvmd;
	include /etc/kvmd/nginx/loc-proxy.conf;
	proxy_read_timeout 7d;
	postpone_output 0;
	proxy_buffering off;
	proxy_ignore_headers X-Accel-Buffering;
	auth_request off;
}

location /api {
	rewrite ^/api$ / break;
	rewrite ^/api/(.*)$ /$1 break;
	proxy_pass http://kvmd;
	include /etc/kvmd/nginx/loc-proxy.conf;
	auth_request off;
}

location /streamer {
	rewrite ^/streamer$ / break;
	rewrite ^/streamer\?(.*)$ ?$1 break;
	rewrite ^/streamer/(.*)$ /$1 break;
	proxy_pass http://ustreamer;
	include /etc/kvmd/nginx/loc-proxy.conf;
	postpone_output 0;
	proxy_buffering off;
	proxy_ignore_headers X-Accel-Buffering;
}

location /redfish {
	proxy_pass http://kvmd;
	include /etc/kvmd/nginx/loc-proxy.conf;
	auth_request off;
}