From 916cfecee720c2d6a8110eff1a858613050e8e67 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 5 Jul 2024 18:13:01 +0700 Subject: [PATCH] nginx configuration --- rootfs/usr/conf/nginx.conf | 36 +++------------------- rootfs/usr/conf/openrouter/openrouter.conf | 36 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 31 deletions(-) create mode 100644 rootfs/usr/conf/openrouter/openrouter.conf diff --git a/rootfs/usr/conf/nginx.conf b/rootfs/usr/conf/nginx.conf index fccb76b..26e454b 100644 --- a/rootfs/usr/conf/nginx.conf +++ b/rootfs/usr/conf/nginx.conf @@ -1,3 +1,4 @@ + #user nobody; worker_processes 1; @@ -5,43 +6,16 @@ events { worker_connections 1024; } + http { include mime.types; default_type application/octet-stream; + sendfile on; keepalive_timeout 65; + gzip on; - server { - listen 80; - server_name localhost; - location / { - proxy_pass http://127.0.0.1:43244; - } + include openrouter/openrouter.conf; - location /api/settings { - proxy_pass http://127.0.0.1:43244/api/settings; - } - - location /api/syslog { - proxy_pass http://127.0.0.1:43244/api/syslog; - } - - location /api/reboot { - proxy_pass http://127.0.0.1:43244/api/reboot; - } - - location /auth { - proxy_pass http://127.0.0.1:43243/auth; - } - - location /api { - proxy_pass http://127.0.0.1:43243/api; - } - - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root html; - } - } } diff --git a/rootfs/usr/conf/openrouter/openrouter.conf b/rootfs/usr/conf/openrouter/openrouter.conf new file mode 100644 index 0000000..aac6fbb --- /dev/null +++ b/rootfs/usr/conf/openrouter/openrouter.conf @@ -0,0 +1,36 @@ +server { + listen 80; + server_name localhost; + + + + location / { + proxy_pass http://127.0.0.1:43244; + } + + location /api/settings { + proxy_pass http://127.0.0.1:43244/api/settings; + } + + location /api/syslog { + proxy_pass http://127.0.0.1:43244/api/syslog; + } + + location /api/reboot { + proxy_pass http://127.0.0.1:43244/api/reboot; + } + + location /auth { + proxy_pass http://127.0.0.1:43243/auth; + } + + location /api { + proxy_pass http://127.0.0.1:43243/api; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + + } \ No newline at end of file