Skip to content
Merged
Changes from all 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,25 @@
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:[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 =]] and the `purge_servers` setting is set automatically.

Check warning on line 154 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#L154

[Ibexa.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[Ibexa.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md", "range": {"start": {"line": 154, "column": 122}}}, "severity": "WARNING"}
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:

```

Check failure on line 157 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#L157

[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": 157, "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](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 =]]),
Expand Down
Loading