From 914c03cd64b72c739fa3b21f94ab5275e53bd7b0 Mon Sep 17 00:00:00 2001 From: Stephen Donaghy Date: Mon, 3 Jan 2022 21:47:10 +0000 Subject: [PATCH] Added sample configs for Shinobi CCTV/NVR --- shinobi.subdomain.conf.sample | 41 +++++++++++++++++++++++++++++++++++ shinobi.subfolder.conf.sample | 28 ++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 shinobi.subdomain.conf.sample create mode 100644 shinobi.subfolder.conf.sample diff --git a/shinobi.subdomain.conf.sample b/shinobi.subdomain.conf.sample new file mode 100644 index 0000000..0e99596 --- /dev/null +++ b/shinobi.subdomain.conf.sample @@ -0,0 +1,41 @@ +## Version 2022/01/03 +# make sure that your dns has a cname set for shinobi and that your shinobi config.json is not using a base url + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name shinobi.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + # enable for ldap auth, fill in ldap details in ldap.conf + #include /config/nginx/ldap.conf; + + # enable for Authelia + #include /config/nginx/authelia-server.conf; + + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth + #auth_request /auth; + #error_page 401 =200 /ldaplogin; + + # enable for Authelia + #include /config/nginx/authelia-location.conf; + + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app shinobi; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } + +} diff --git a/shinobi.subfolder.conf.sample b/shinobi.subfolder.conf.sample new file mode 100644 index 0000000..9f6de1e --- /dev/null +++ b/shinobi.subfolder.conf.sample @@ -0,0 +1,28 @@ +## Version 2022/01/03 +# ensure your config.json file has an entry for the base url set to /shinobi, i.e. +# "baseurl":"/shinobi" + +location /shinobi { + return 301 $scheme://$host/shinobi/; +} + +location ^~ /shinobi/ { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf + #auth_request /auth; + #error_page 401 =200 /ldaplogin; + + # enable for Authelia, also enable authelia-server.conf in the default site config + #include /config/nginx/authelia-location.conf; + + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app shinobi; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + +}