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.conf35
1 files changed, 7 insertions, 28 deletions
diff --git a/configs/nginx/nginx.conf b/configs/nginx/nginx.conf
index 22271d20..ae2703ec 100644
--- a/configs/nginx/nginx.conf
+++ b/configs/nginx/nginx.conf
@@ -6,7 +6,7 @@ worker_processes 4;
# error_log /tmp/nginx.error.log;
error_log stderr;
-include /etc/nginx/apps/*/main-ctx.conf;
+include /usr/share/kvmd/extras/*/nginx.main-ctx.conf;
events {
worker_connections 1024;
@@ -40,26 +40,12 @@ http {
server 127.0.0.1:8082 fail_timeout=0s max_fails=0;
}
- include /etc/nginx/apps/*/http-ctx.conf;
+ include /usr/share/kvmd/extras/*/nginx.http-ctx.conf;
- lua_shared_dict WS_TOKENS 10m;
- init_by_lua_block {
- WS_TOKEN_EXPIRES = 10;
-
- local cjson = require("cjson");
- local io = require("io");
-
- local apps = {};
- local apps_dir_path = "/etc/nginx/apps";
- for app in io.popen("ls " .. apps_dir_path):lines() do
- local manifest_file = assert(io.open(apps_dir_path .. "/" .. app .. "/manifest.json", "r"));
- local manifest = cjson.decode(manifest_file:read("*all"));
- manifest_file:close();
- apps[app] = manifest;
- end
-
- APPS_JSON = cjson.encode(apps);
- }
+#PROD lua_shared_dict WS_TOKENS 10m;
+#PROD init_by_lua_block {
+#PROD WS_TOKEN_EXPIRES = 10;
+#PROD }
#PROD server {
#PROD listen 80;
@@ -98,13 +84,6 @@ http {
}
}
- location /get_apps {
- default_type "application/json";
- content_by_lua_block {
- ngx.say(APPS_JSON);
- }
- }
-
location /kvmd/ws {
#PROD auth_basic off;
#PROD access_by_lua_block {
@@ -165,6 +144,6 @@ http {
proxy_ignore_headers X-Accel-Buffering;
}
- include /etc/nginx/apps/*/server-ctx.conf;
+ include /usr/share/kvmd/extras/*/nginx.server-ctx.conf;
}
}