|
| 1 | +## Version 2023/09/01 |
| 2 | +# make sure that your grafana container is named grafana |
| 3 | +# make sure that grafana is set to work with the base url /grafana/ |
| 4 | + |
| 5 | +location ^~ /semaphore/ { |
| 6 | + # enable the next two lines for http auth |
| 7 | + #auth_basic "Restricted"; |
| 8 | + #auth_basic_user_file /config/nginx/.htpasswd; |
| 9 | + |
| 10 | + # enable for ldap auth (requires ldap-server.conf in the server block) |
| 11 | + #include /config/nginx/ldap-location.conf; |
| 12 | + |
| 13 | + # enable for Authelia (requires authelia-server.conf in the server block) |
| 14 | + #include /config/nginx/authelia-location.conf; |
| 15 | + |
| 16 | + # enable for Authentik (requires authentik-server.conf in the server block) |
| 17 | + #include /config/nginx/authentik-location.conf; |
| 18 | + |
| 19 | + include /config/nginx/proxy.conf; |
| 20 | + include /config/nginx/resolver.conf; |
| 21 | + set $upstream_app semaphore; |
| 22 | + set $upstream_port 3000; |
| 23 | + set $upstream_proto http; |
| 24 | + proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 25 | + |
| 26 | + # Clear Authorization Header if you are using http auth and normal semaphore auth |
| 27 | + #proxy_set_header Authorization ""; |
| 28 | + |
| 29 | + rewrite ^/semaphore/(.*)$ /$1 break; |
| 30 | + |
| 31 | +} |
| 32 | + |
| 33 | +location ^~ /semaphore/api { |
| 34 | + include /config/nginx/proxy.conf; |
| 35 | + include /config/nginx/resolver.conf; |
| 36 | + set $upstream_app semaphore; |
| 37 | + set $upstream_port 3000; |
| 38 | + set $upstream_proto http; |
| 39 | + proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 40 | + |
| 41 | + # Clear Authorization Header if you are using http auth and normal semaphore auth |
| 42 | + #proxy_set_header Authorization ""; |
| 43 | + |
| 44 | + rewrite ^/semaphore/(.*)$ /$1 break; |
| 45 | + |
| 46 | +} |
0 commit comments