diff --git a/docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md b/docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md index cb1ac55e2b..04f4fda499 100644 --- a/docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md +++ b/docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md @@ -142,6 +142,25 @@ ibexa: purge_servers: [http://my.varnish.server:8081] ``` +#### Varnish and Basic Auth + +If the Varnish server is protected by Basic Auth, specify the Basic Auth credentials within the `purge_servers` setting using the format: + +``` yaml + http_cache: + purge_servers: [http://myuser:mypasswd@my.varnish.server:8081] +``` + +Varnish is enabled by default when using [[= product_name_cloud =]] and the `purge_servers` setting is set automatically. +To enable Basic Auth on [[= product_name_cloud =]] when using Varnish, specify the credentials using the following environment variables to make sure that Varnish is reachable: + +``` +env:HTTPCACHE_USERNAME=myuser +env:HTTPCACHE_PASSWORD=mypasswd +``` + +If you want to use Basic Auth with Fastly on [[= product_name_cloud =]], please see [Enable basic-auth on Fastly](fastly.md#enable-basic-auth-on-fastly). + !!! note "Invalidating Varnish cache using tokens" In setups where the Varnish server IP can change (for example, on [[= product_name_cloud =]]),