Skip to content

Commit 8171be8

Browse files
committed
Added instructions on how to combine varnish with basic-auth
1 parent 21db3dc commit 8171be8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,27 @@ ibexa:
142142
purge_servers: [http://my.varnish.server:8081]
143143
```
144144

145+
#### Varnish and Basic Auth
146+
147+
If purge requests to Varnish is protected by Basic Auth, the Basic Auth credentials can be specified with the
148+
`purge_servers` setting using the format:
149+
150+
``` yaml
151+
http_cache:
152+
purge_servers: [http://myuser:[email protected]:8081]
153+
```
154+
155+
Varnish is enabled by default when using [[= product_name_cloud =]]. There is no need to specify `purge_servers` as this is detected
156+
automatically. When enabling Basic Auth on [[= product_name_cloud =]] when using Varnish, you do however need to specify the credentials
157+
using the following environments in order for purging to work:
158+
159+
```
160+
env:HTTPCACHE_USERNAME=myuser
161+
env:HTTPCACHE_PASSWORD=mypasswd
162+
```
163+
164+
If you want to use Basic Auth with Fastly on [[= product_name_cloud =]], please see [Enable basic-auth on Fastly](...)
165+
145166
!!! note "Invalidating Varnish cache using tokens"
146167

147168
In setups where the Varnish server IP can change (for example, on [[= product_name_cloud =]]),

0 commit comments

Comments
 (0)