-
Notifications
You must be signed in to change notification settings - Fork 81
Added instructions on how to combine varnish with basic-auth #2526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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] | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Can we suggest using HTTPS by default, for everything? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: | ||||||
vidarl marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| ``` | ||||||
|
Check failure on line 159 in docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md
|
||||||
| 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](...) | ||||||
vidarl marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| !!! note "Invalidating Varnish cache using tokens" | ||||||
|
|
||||||
| In setups where the Varnish server IP can change (for example, on [[= product_name_cloud =]]), | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.