File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## Version 2022/01/03
2+ # make sure that your dns has a cname set for shinobi and that your shinobi config.json is not using a base url
3+
4+ server {
5+ listen 443 ssl;
6+ listen [::]:443 ssl;
7+
8+ server_name shinobi.*;
9+
10+ include /config/nginx/ssl.conf;
11+
12+ client_max_body_size 0;
13+
14+ # enable for ldap auth, fill in ldap details in ldap.conf
15+ #include /config/nginx/ldap.conf;
16+
17+ # enable for Authelia
18+ #include /config/nginx/authelia-server.conf;
19+
20+ location / {
21+ # enable the next two lines for http auth
22+ #auth_basic "Restricted";
23+ #auth_basic_user_file /config/nginx/.htpasswd;
24+
25+ # enable the next two lines for ldap auth
26+ #auth_request /auth;
27+ #error_page 401 =200 /ldaplogin;
28+
29+ # enable for Authelia
30+ #include /config/nginx/authelia-location.conf;
31+
32+ include /config/nginx/proxy.conf;
33+ include /config/nginx/resolver.conf;
34+ set $upstream_app shinobi;
35+ set $upstream_port 8080;
36+ set $upstream_proto http;
37+ proxy_pass $upstream_proto://$upstream_app:$upstream_port;
38+
39+ }
40+
41+ }
Original file line number Diff line number Diff line change 1+ ## Version 2022/01/03
2+ # ensure your config.json file has an entry for the base url set to /shinobi, i.e.
3+ # "baseurl":"/shinobi"
4+
5+ location /shinobi {
6+ return 301 $scheme://$host/shinobi/;
7+ }
8+
9+ location ^~ /shinobi/ {
10+ # enable the next two lines for http auth
11+ #auth_basic "Restricted";
12+ #auth_basic_user_file /config/nginx/.htpasswd;
13+
14+ # enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf
15+ #auth_request /auth;
16+ #error_page 401 =200 /ldaplogin;
17+
18+ # enable for Authelia, also enable authelia-server.conf in the default site config
19+ #include /config/nginx/authelia-location.conf;
20+
21+ include /config/nginx/proxy.conf;
22+ include /config/nginx/resolver.conf;
23+ set $upstream_app shinobi;
24+ set $upstream_port 8080;
25+ set $upstream_proto http;
26+ proxy_pass $upstream_proto://$upstream_app:$upstream_port;
27+
28+ }
You can’t perform that action at this time.
0 commit comments