Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,27 @@
purge_servers: [http://my.varnish.server:8081]
```

#### Varnish and Basic Auth

If purge requests to Varnish is protected by Basic Auth, the Basic Auth credentials can be specified with the
`purge_servers` setting using the format:

``` yaml
http_cache:
purge_servers: [http://myuser:[email protected]:8081]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
purge_servers: [http://myuser:[email protected]:8081]
purge_servers: [https://myuser:[email protected]:8081]

Can we suggest using HTTPS by default, for everything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can do that. But open source version of Varnish do not support HTTPS termiation, so I think it makes more sense to always use HTTP for varnish purge servers in or docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! My mind always goes to "HTTPS links everywhere", but it makes sense to make an exception when it's expected to see HTTP.

```

Varnish is enabled by default when using [[= product_name_cloud =]]. There is no need to specify `purge_servers` as this is detected
automatically. When enabling Basic Auth on [[= product_name_cloud =]] when using Varnish, you do however need to specify the credentials
using the following environment variables in order for purging to work:

```

Check failure on line 159 in docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md#L159

[Ibexa.CodeBlockLanguages] Always provide a language with a code block.
Raw output
{"message": "[Ibexa.CodeBlockLanguages] Always provide a language with a code block.", "location": {"path": "docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md", "range": {"start": {"line": 159, "column": 1}}}, "severity": "ERROR"}
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](...)

!!! note "Invalidating Varnish cache using tokens"

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