summaryrefslogtreecommitdiff
path: root/configs/nginx/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'configs/nginx/nginx.conf')
-rw-r--r--configs/nginx/nginx.conf105
1 files changed, 2 insertions, 103 deletions
diff --git a/configs/nginx/nginx.conf b/configs/nginx/nginx.conf
index 9984d686..a64a0f71 100644
--- a/configs/nginx/nginx.conf
+++ b/configs/nginx/nginx.conf
@@ -18,9 +18,6 @@ http {
default_type application/octet-stream;
charset utf-8;
- absolute_redirect off;
- index index.html;
-
sendfile on;
tcp_nodelay on;
tcp_nopush on;
@@ -33,14 +30,7 @@ http {
scgi_temp_path /tmp/kvmd-nginx.scgi_temp;
uwsgi_temp_path /tmp/kvmd-nginx.uwsgi_temp;
- upstream kvmd {
- server unix:/run/kvmd/kvmd.sock fail_timeout=0s max_fails=0;
- }
-
- upstream ustreamer {
- server unix:/run/kvmd/ustreamer.sock fail_timeout=0s max_fails=0;
- }
-
+ include /etc/kvmd/nginx/kvmd.ctx-http.conf;
include /usr/share/kvmd/extras/*/nginx.ctx-http.conf;
#PROD server {
@@ -54,98 +44,7 @@ http {
server_name localhost;
#PROD include /etc/kvmd/nginx/ssl.conf;
- 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;
- auth_request off;
- }
-
- location = /favicon.ico {
- alias /usr/share/kvmd/web/favicon.ico;
- auth_request off;
- }
-
- location = /robots.txt {
- alias /usr/share/kvmd/web/robots.txt;
- 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;
- }
-
+ include /etc/kvmd/nginx/kvmd.ctx-server.conf;
include /usr/share/kvmd/extras/*/nginx.ctx-server.conf;
}
}