Skip to content

Commit 6345796

Browse files
committed
docs: base path documentation update, oicd example mentioned
1 parent 0572514 commit 6345796

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

.examples/docker-compose-oidc/compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Note that this example is using network_mode: host, which may have security implications.
2+
# It is done this way for simplicity, to avoid complications that come from the fact that
3+
# Gatus NEEDS to see authentication provider under same address as the one used by the end-user.
4+
# This way both Gatus and the end-user see the authentication provider under "localhost", what
5+
# is convenient for local testing.
16
services:
27
dex:
38
network_mode: host

.examples/docker-compose-reverse-proxy-oicd/compose.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
1+
# Note that this example is using network_mode: host, which may have security implications.
2+
# It is done this way for simplicity, to avoid complications that come from the fact that
3+
# Gatus NEEDS to see authentication provider under same address as the one used by the end-user.
4+
# This way both Gatus and the end-user see the authentication provider under "localhost", what
5+
# is convenient for local testing.
26
services:
37
dex:
48
network_mode: host

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,6 +2666,8 @@ security:
26662666

26672667
Confused? Read [Securing Gatus with OIDC using Auth0](https://twin.sh/articles/56/securing-gatus-with-oidc-using-auth0).
26682668

2669+
The example configuration using [Dex](https://dexidp.io/) as the OIDC provider,
2670+
can be found in [.examples/docker-compose-oidc](.examples/docker-compose-oidc).
26692671

26702672
### TLS Encryption
26712673
Gatus supports basic encryption with TLS. To enable this, certificate files in PEM format have to be provided.
@@ -3272,10 +3274,17 @@ clears their browser's localstorage.
32723274

32733275

32743276
### Exposing Gatus on a custom path
3275-
Currently, you can expose the Gatus UI using a fully qualified domain name (FQDN) such as `status.example.org`. However, it does not support path-based routing, which means you cannot expose it through a URL like `example.org/status/`.
3277+
Gatus always exposes its endpoints and UI under the root path ('/'), and it cannot be changed.
3278+
However, if you find yourself in a situation where you need to expose Gatus on a custom path (e.g. `/gatus/`),
3279+
you can achieve this by using a reverse proxy such as Nginx or Traefik or Caddy to handle the path rewriting for you.
3280+
In order for it to work properly, you must tell Gatus to use the custom path as its `web.base-path` so that all links
3281+
are generated correctly and redirections work as expected.
32763282

3277-
For more information, see https://github.com/TwiN/gatus/issues/88.
3283+
See [examples/docker-compose-reverse-proxy](.examples/docker-compose-reverse-proxy) for example using Caddy.
32783284

3285+
Note that if you are using OIDC for authentication, your `security.oidc.redirect-url` must include the custom path as well.
3286+
3287+
See [examples/docker-compose-reverse-proxy-oidc](.examples/docker-compose-reverse-proxy-oidc) for an example using Caddy and OIDC.
32793288

32803289
### Exposing Gatus on a custom port
32813290
By default, Gatus is exposed on port `8080`, but you may specify a different port by setting the `web.port` parameter:

0 commit comments

Comments
 (0)