From 2f793845d5a7fc78efda5d2e38e6169d094b712a Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 8 Jan 2026 18:08:16 +0100 Subject: [PATCH 01/19] clustering_with_ddev.md: Install reverse proxy --- .../clustering/clustering_with_ddev.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 680c0b7ff8..1e182e5c9e 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -27,6 +27,57 @@ The `ddev config --php-version` option should set the same PHP version as the pr To run an [[= product_name_cloud =]] project locally, you may refer to [DDEV and Ibexa Cloud](ddev_and_ibexa_cloud.md) instead. +## Install reverse proxy + +### Varnish + +The following sequence of commands: + +1. Set some variables to distinguish Varnish versions, here for Varnish 7.1 +1. Copy and customize VCL files in .ddev/varnish (which will be mounted as /etc/varnish) +2. Set the Varnish version to use and its demon starting parameters to use the files +3. Adds the Varnish container +4. Restarts the DDEV cluster + +```bash +VARNISH_VERSION=7.1 +vcl_path=vcl_path +vcl_file=varnish7.vcl +mkdir -p .ddev/varnish +cp vendor/ibexa/http-cache/docs/varnish/vcl/$vcl_file .ddev/varnish/ +sed 's/.host = "127.0.0.1";/.host = "web";/' vendor/ibexa/http-cache/docs/varnish/vcl/parameters.vcl > .ddev/varnish/parameters.vcl +ddev exec -s varnish "sed -i 's/acl invalidators/acl invalidators +log/' parameters.vcl; \ +sed -i '/^acl debuggers {$/a \\ "0.0.0.0"/0; \/\/ debug from whatever IP' parameters.vcl; \ +sed -i 's/acl debuggers/acl debuggers +log/' parameters.vcl;" +ddev dotenv set .ddev/.env.varnish --varnish-docker-image=varnish:$VARNISH_VERSION --varnish-varnishd-params " -p $vcl_path=/etc/varnish -f /etc/varnish/$vcl_file" + +ddev get ddev/ddev-varnish +ddev restart +``` + +To use Varnish 6.0LTS: + +```bash +VARNISH_VERSION=6.0 +vcl_path=vcl_dir +vcl_file=varnish6.vcl +``` + +The Varnish server replace the web server in some places. +If you run `ddev describe`, you can see that Varnish is now the one responding to DDEV domain `.ddev.site` +while the web server still replies to `127.0.0.1`. + +TODO: Is there a way to still have access to web server directly from `.ddev.site`? + +### Fastly + +TODO: confirm and detail + +For Fastly (as for [Ibexa Connect](https://doc.ibexa.co/projects/connect/en/latest/)), your instance must be visible from Internet. + +To use [ngrok](ngrok.com) alongside [`ddev share`](https://docs.ddev.com/en/stable/users/topics/sharing/#using-ddev-share-easiest) is probably the easiest way to achieve this. +TODO: Be very careful with closing ngrok tunnels when not needed anymore, to not communicate your ngrok URL to unintended people (don't use it for demo, don't store it on a Fastly or Ibexa Connect account used by too many people), etc. + ## Install search engine A [search engine](search_engines.md) can be added to the cluster. From a8d4f4564609eb61f4f6f6be783388c73aa97551 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 8 Jan 2026 18:23:12 +0100 Subject: [PATCH 02/19] clustering_with_ddev.md: Fix ngrok link --- .../clustering/clustering_with_ddev.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 1e182e5c9e..fe83ff5f70 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -75,7 +75,7 @@ TODO: confirm and detail For Fastly (as for [Ibexa Connect](https://doc.ibexa.co/projects/connect/en/latest/)), your instance must be visible from Internet. -To use [ngrok](ngrok.com) alongside [`ddev share`](https://docs.ddev.com/en/stable/users/topics/sharing/#using-ddev-share-easiest) is probably the easiest way to achieve this. +To use [ngrok](https://ngrok.com/) alongside [`ddev share`](https://docs.ddev.com/en/stable/users/topics/sharing/#using-ddev-share-easiest) is probably the easiest way to achieve this. TODO: Be very careful with closing ngrok tunnels when not needed anymore, to not communicate your ngrok URL to unintended people (don't use it for demo, don't store it on a Fastly or Ibexa Connect account used by too many people), etc. ## Install search engine From 07c16c77c688cff2d95aaedc795256b17ef001dd Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 8 Jan 2026 19:03:36 +0100 Subject: [PATCH 03/19] clustering_with_ddev.md: web's proxy config --- .../clustering/clustering_with_ddev.md | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index fe83ff5f70..d936f8a35e 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -34,10 +34,11 @@ To run an [[= product_name_cloud =]] project locally, you may refer to [DDEV and The following sequence of commands: 1. Set some variables to distinguish Varnish versions, here for Varnish 7.1 -1. Copy and customize VCL files in .ddev/varnish (which will be mounted as /etc/varnish) -2. Set the Varnish version to use and its demon starting parameters to use the files -3. Adds the Varnish container -4. Restarts the DDEV cluster +2. Copy and customize VCL files in .ddev/varnish (which will be mounted as /etc/varnish) +3. Set the Varnish version to use and its demon starting parameters to use the files +4. Adds the Varnish container +5. Sets Varnish as the HTTP cache server +6. Restarts the DDEV cluster ```bash VARNISH_VERSION=7.1 @@ -46,15 +47,22 @@ vcl_file=varnish7.vcl mkdir -p .ddev/varnish cp vendor/ibexa/http-cache/docs/varnish/vcl/$vcl_file .ddev/varnish/ sed 's/.host = "127.0.0.1";/.host = "web";/' vendor/ibexa/http-cache/docs/varnish/vcl/parameters.vcl > .ddev/varnish/parameters.vcl -ddev exec -s varnish "sed -i 's/acl invalidators/acl invalidators +log/' parameters.vcl; \ -sed -i '/^acl debuggers {$/a \\ "0.0.0.0"/0; \/\/ debug from whatever IP' parameters.vcl; \ -sed -i 's/acl debuggers/acl debuggers +log/' parameters.vcl;" +ddev exec -s varnish "sed -i 's/acl invalidators {/acl invalidators +log {/' parameters.vcl; \ + sed -i '/^acl debuggers {$/a \\ \"0.0.0.0\"/0; \/\/ debug from whatever IP' parameters.vcl; \ + sed -i 's/acl debuggers {/acl debuggers +log {/' parameters.vcl;" ddev dotenv set .ddev/.env.varnish --varnish-docker-image=varnish:$VARNISH_VERSION --varnish-varnishd-params " -p $vcl_path=/etc/varnish -f /etc/varnish/$vcl_file" ddev get ddev/ddev-varnish + +ddev config --web-environment-add HTTPCACHE_PURGE_SERVER=http://varnish +ddev config --web-environment-add HTTPCACHE_PURGE_TYPE=varnish +ddev config --web-environment-add TRUSTED_PROXIES=varnish + ddev restart ``` +TODO: [Apache TRUSTED_PROXIES](https://github.com/ibexa/post-install/blob/main/resources/templates/apache2/vhost.template#L67) + To use Varnish 6.0LTS: ```bash From edd500ee5ff2ba379d2c85afc3bf8cad47aef76a Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 9 Jan 2026 11:20:55 +0100 Subject: [PATCH 04/19] clustering_with_ddev.md: Fix parameters.vcl edition --- .../clustering/clustering_with_ddev.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index d936f8a35e..d494d4fd7b 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -34,7 +34,10 @@ To run an [[= product_name_cloud =]] project locally, you may refer to [DDEV and The following sequence of commands: 1. Set some variables to distinguish Varnish versions, here for Varnish 7.1 -2. Copy and customize VCL files in .ddev/varnish (which will be mounted as /etc/varnish) +2. Copy and customize VCL files in `.ddev/varnish/` (which will be mounted as `/etc/varnish/`) + - set `web` container has the backend host + - enable logging of access control list matching for both `invalidators` and `debuggers` lists + - add "all IPs" CIDR notation to `debuggers` list to allow debugging info from any IP 3. Set the Varnish version to use and its demon starting parameters to use the files 4. Adds the Varnish container 5. Sets Varnish as the HTTP cache server @@ -47,9 +50,11 @@ vcl_file=varnish7.vcl mkdir -p .ddev/varnish cp vendor/ibexa/http-cache/docs/varnish/vcl/$vcl_file .ddev/varnish/ sed 's/.host = "127.0.0.1";/.host = "web";/' vendor/ibexa/http-cache/docs/varnish/vcl/parameters.vcl > .ddev/varnish/parameters.vcl -ddev exec -s varnish "sed -i 's/acl invalidators {/acl invalidators +log {/' parameters.vcl; \ - sed -i '/^acl debuggers {$/a \\ \"0.0.0.0\"/0; \/\/ debug from whatever IP' parameters.vcl; \ - sed -i 's/acl debuggers {/acl debuggers +log {/' parameters.vcl;" +sed -i '/^acl debuggers {$/a \\ "0.0.0.0"/0; \/\/ debug from whatever IP' .ddev/varnish/parameters.vcl +if [[ $VARNISH_VERSION == 7.* ]]; then + sed -i 's/acl invalidators {/acl invalidators +log {/' .ddev/varnish/parameters.vcl + sed -i 's/acl debuggers {/acl debuggers +log {/' .ddev/varnish/parameters.vcl +fi ddev dotenv set .ddev/.env.varnish --varnish-docker-image=varnish:$VARNISH_VERSION --varnish-varnishd-params " -p $vcl_path=/etc/varnish -f /etc/varnish/$vcl_file" ddev get ddev/ddev-varnish @@ -63,7 +68,7 @@ ddev restart TODO: [Apache TRUSTED_PROXIES](https://github.com/ibexa/post-install/blob/main/resources/templates/apache2/vhost.template#L67) -To use Varnish 6.0LTS: +To use Varnish 6.0LTS, set the following variables instead: ```bash VARNISH_VERSION=6.0 From 04cbbfc6ef2d16a6d26bd26a1bb5cb954f0a771a Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 9 Jan 2026 11:43:39 +0100 Subject: [PATCH 05/19] clustering_with_ddev.md: Update script description --- .../clustering/clustering_with_ddev.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index d494d4fd7b..0ec1f0b7cd 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -36,8 +36,9 @@ The following sequence of commands: 1. Set some variables to distinguish Varnish versions, here for Varnish 7.1 2. Copy and customize VCL files in `.ddev/varnish/` (which will be mounted as `/etc/varnish/`) - set `web` container has the backend host - - enable logging of access control list matching for both `invalidators` and `debuggers` lists - add "all IPs" CIDR notation to `debuggers` list to allow debugging info from any IP + - on Varnish 7, enable logging of access control list matching for both `invalidators` and `debuggers` lists + (new Varnish 7 syntax, it was enabled by default on previous versions) 3. Set the Varnish version to use and its demon starting parameters to use the files 4. Adds the Varnish container 5. Sets Varnish as the HTTP cache server From d55279f18ede5bc9f24b2d488b3c2ecf28af4688 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 9 Jan 2026 12:45:35 +0100 Subject: [PATCH 06/19] clustering_with_ddev.md: Fix invalidators; Add ddev varnishlog --- .../clustering/clustering_with_ddev.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 0ec1f0b7cd..7f6fec87ba 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -51,7 +51,8 @@ vcl_file=varnish7.vcl mkdir -p .ddev/varnish cp vendor/ibexa/http-cache/docs/varnish/vcl/$vcl_file .ddev/varnish/ sed 's/.host = "127.0.0.1";/.host = "web";/' vendor/ibexa/http-cache/docs/varnish/vcl/parameters.vcl > .ddev/varnish/parameters.vcl -sed -i '/^acl debuggers {$/a \\ "0.0.0.0"/0; \/\/ debug from whatever IP' .ddev/varnish/parameters.vcl +sed -i '/^acl invalidators {$/a \\ "web";' .ddev/varnish/parameters.vcl +sed -i '/^acl debuggers {$/a \\ "0.0.0.0"/0; \/\/ debug from any IP' .ddev/varnish/parameters.vcl if [[ $VARNISH_VERSION == 7.* ]]; then sed -i 's/acl invalidators {/acl invalidators +log {/' .ddev/varnish/parameters.vcl sed -i 's/acl debuggers {/acl debuggers +log {/' .ddev/varnish/parameters.vcl @@ -83,6 +84,13 @@ while the web server still replies to `127.0.0.1`. TODO: Is there a way to still have access to web server directly from `.ddev.site`? +You can use `ddev varnishlog` command to monitor Varnish logs in real time. +Due to how parameters are passed to the container, you may have to wrap some parameters in quotes twice, for example, the purge request monitoring: + +```bash +ddev varnishlog -q "'ReqMethod ~ PURGE.*'"; +``` + ### Fastly TODO: confirm and detail From 12058fdec5b46bae8d92c351e84961562d0232bf Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:43:20 +0100 Subject: [PATCH 07/19] clustering_with_ddev.md: Update script description --- .../clustering/clustering_with_ddev.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 7f6fec87ba..409602e348 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -35,7 +35,7 @@ The following sequence of commands: 1. Set some variables to distinguish Varnish versions, here for Varnish 7.1 2. Copy and customize VCL files in `.ddev/varnish/` (which will be mounted as `/etc/varnish/`) - - set `web` container has the backend host + - set `web` container has the backend host and an invalidator (so back office can purge cache) - add "all IPs" CIDR notation to `debuggers` list to allow debugging info from any IP - on Varnish 7, enable logging of access control list matching for both `invalidators` and `debuggers` lists (new Varnish 7 syntax, it was enabled by default on previous versions) From 565b58bf7772fe26610454cd0e65ecc912930ace Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 9 Jan 2026 14:07:19 +0100 Subject: [PATCH 08/19] clustering_with_ddev.md: Update script description --- .../clustering/clustering_with_ddev.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 409602e348..c65766c5d1 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -80,9 +80,7 @@ vcl_file=varnish6.vcl The Varnish server replace the web server in some places. If you run `ddev describe`, you can see that Varnish is now the one responding to DDEV domain `.ddev.site` -while the web server still replies to `127.0.0.1`. - -TODO: Is there a way to still have access to web server directly from `.ddev.site`? +while the web server still replies to `127.0.0.1` with its own ports. You can use `ddev varnishlog` command to monitor Varnish logs in real time. Due to how parameters are passed to the container, you may have to wrap some parameters in quotes twice, for example, the purge request monitoring: From edc40d6d0d23c531ab7fe73725237b476d066a07 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 9 Jan 2026 15:51:16 +0100 Subject: [PATCH 09/19] clustering_with_ddev.md: TRUSTED_PROXIES --- .../clustering/clustering_with_ddev.md | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index c65766c5d1..e4b845dc47 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -68,8 +68,6 @@ ddev config --web-environment-add TRUSTED_PROXIES=varnish ddev restart ``` -TODO: [Apache TRUSTED_PROXIES](https://github.com/ibexa/post-install/blob/main/resources/templates/apache2/vhost.template#L67) - To use Varnish 6.0LTS, set the following variables instead: ```bash @@ -78,10 +76,47 @@ vcl_path=vcl_dir vcl_file=varnish6.vcl ``` +If you're using [Apache as web server](install_with_ddev.md#switch-to-apache-and-its-virtual-host), +you must set `varnish` as a trusted proxy in `.ddev/apache/apache-site.conf` before restarting DDEV: + +```bash +sed -i 's/#SetEnv TRUSTED_PROXIES ""/SetEnv TRUSTED_PROXIES "varnish"/' .ddev/apache/apache-site.conf + +ddev restart +``` + The Varnish server replace the web server in some places. If you run `ddev describe`, you can see that Varnish is now the one responding to DDEV domain `.ddev.site` while the web server still replies to `127.0.0.1` with its own ports. +You can see Varnish headers in HTTP responses, for example: + +```console +% curl -s -c cookies.txt -b cookies.txt -I https://.ddev.site:/ +HTTP/2 200 +server: Apache/2.4.65 (Debian) +vary: Origin,X-Editorial-Mode +via: 1.1 varnish (Varnish/7.1) +x-cache: HIT +x-cache-debug: 1 +x-cache-hits: 5 +x-cache-ttl: 87654.321 +x-debug-token: 012345 +x-debug-token-link: https://ddev-ibexa-tmp2.ddev.site:8443/_profiler/012345 +x-powered-by: Ibexa Commerce v5 +x-robots-tag: noindex +x-varnish: 12345 67890 +xkey: ez-all c52 ct42 l2 pl1 p1 p2 +content-length: 45678 +``` + +You can see how the `web` server is responding to `varnish`: + +```console +% curl -s -H "Surrogate-Capability: abc=ESI/1.0" http://127.0.0.1:/product-catalog | grep 'esi:include' + Date: Fri, 9 Jan 2026 16:12:20 +0100 Subject: [PATCH 11/19] clustering_with_ddev.md: more info --- .../clustering/clustering_with_ddev.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 6fd77f597c..5eaa8526f3 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -124,17 +124,21 @@ Due to how parameters are passed to the container, you may have to wrap some par ddev varnishlog -q "'ReqMethod ~ PURGE.*'"; ``` +For more information on topics such as available configurations, command lines, or monitoring, see [ddev/ddev-varnish README](https://github.com/ddev/ddev-varnish). + ### Fastly For Fastly (as for [Ibexa Connect](https://doc.ibexa.co/projects/connect/en/latest/)), your instance must be visible from Internet. To use [ngrok](https://ngrok.com/) alongside [`ddev share`](https://docs.ddev.com/en/stable/users/topics/sharing/#using-ddev-share-easiest) is probably the easiest way to achieve this. -Be very careful, -close ngrok tunnels when not needed anymore, -don't communicate your ngrok URL to unintended people -(for example, don't use it for live demo on shared screen, -don't store it on a Fastly or Ibexa Connect account used by too many people or externals). +Be very careful when making a local development instance visible from Interne. +For example, + +- close ngrok tunnels when not needed anymore, +- don't communicate your ngrok URL to unintended people, +- don't use it for live demo on shared screen, +- don't store it on a Fastly or Ibexa Connect account used by external people… ## Install search engine From 1aad23bc5183e841049d2813760ffdf6bd3ed575 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:18:32 +0100 Subject: [PATCH 12/19] clustering_with_ddev.md: more info --- .../clustering/clustering_with_ddev.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 5eaa8526f3..b8b5c776bf 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -92,7 +92,7 @@ while the web server still replies to `127.0.0.1` with its own ports. You can see Varnish headers in HTTP responses, for example: ```console -% curl -s -c cookies.txt -b cookies.txt -I https://.ddev.site:/ +% curl -s -c cookies.txt -b cookies.txt -I https://.ddev.site:/ HTTP/2 200 server: Apache/2.4.65 (Debian) vary: Origin,X-Editorial-Mode @@ -113,7 +113,7 @@ content-length: 45678 You can see how the `web` server is responding to `varnish`: ```console -% curl -s -H "Surrogate-Capability: abc=ESI/1.0" http://127.0.0.1:/product-catalog | grep 'esi:include' +% curl -s -H "Surrogate-Capability: abc=ESI/1.0" http://127.0.0.1:/product-catalog | grep 'esi:include' Date: Wed, 14 Jan 2026 10:35:38 +0100 Subject: [PATCH 14/19] Apply suggestions from code review --- .../clustering/clustering_with_ddev.md | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 55ad765116..57b4187d50 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -33,7 +33,7 @@ To run an [[= product_name_cloud =]] project locally, you may refer to [DDEV and The following sequence of commands: -1. Set some variables to distinguish Varnish versions, here for Varnish 7.1 +1. Set some variables to distinguish between Varnish versions, here for Varnish 7.1 2. Copy and customize VCL files in `.ddev/varnish/` (which is mounted as `/etc/varnish/` into the container) - set `web` container has the backend host and an invalidator (so back office can purge cache) - add "all IPs" CIDR notation to `debuggers` list to allow debugging info from any IP @@ -46,17 +46,23 @@ The following sequence of commands: ```bash VARNISH_VERSION=7.1 -vcl_path=vcl_path -vcl_file=varnish7.vcl mkdir -p .ddev/varnish -cp vendor/ibexa/http-cache/docs/varnish/vcl/$vcl_file .ddev/varnish/ sed 's/.host = "127.0.0.1";/.host = "web";/' vendor/ibexa/http-cache/docs/varnish/vcl/parameters.vcl > .ddev/varnish/parameters.vcl sed -i '/^acl invalidators {$/a \\ "web";' .ddev/varnish/parameters.vcl sed -i '/^acl debuggers {$/a \\ "0.0.0.0"/0; \/\/ debug from any IP' .ddev/varnish/parameters.vcl if [[ $VARNISH_VERSION == 7.* ]]; then sed -i 's/acl invalidators {/acl invalidators +log {/' .ddev/varnish/parameters.vcl sed -i 's/acl debuggers {/acl debuggers +log {/' .ddev/varnish/parameters.vcl + vcl_path=vcl_path + vcl_file=varnish7.vcl +elif [[ $VARNISH_VERSION == 6.* ]] + vcl_path=vcl_dir + vcl_file=varnish6.vcl +elif [[ $VARNISH_VERSION == 5.* ]] + vcl_path=vcl_dir + vcl_file=varnish5.vcl fi +cp vendor/ibexa/http-cache/docs/varnish/vcl/$vcl_file .ddev/varnish/ ddev dotenv set .ddev/.env.varnish --varnish-docker-image=varnish:$VARNISH_VERSION --varnish-varnishd-params " -p $vcl_path=/etc/varnish -f /etc/varnish/$vcl_file" ddev get ddev/ddev-varnish @@ -66,15 +72,13 @@ ddev config --web-environment-add HTTPCACHE_PURGE_TYPE=varnish ddev config --web-environment-add TRUSTED_PROXIES=varnish ddev restart +ddev php bin/console cache:clear ``` -To use Varnish 6.0LTS, set the following variables instead: +To use Varnish 6.0LTS, set the following variable instead: ```bash VARNISH_VERSION=6.0 -vcl_path=vcl_dir -vcl_file=varnish6.vcl -``` If you're using [Apache as web server](install_with_ddev.md#switch-to-apache-and-its-virtual-host), you must set `varnish` as a trusted proxy in `.ddev/apache/apache-site.conf` before restarting DDEV: From f99b46ad94cbc61aa6e94c018dc99a2accdc418c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 14 Jan 2026 10:49:09 +0100 Subject: [PATCH 15/19] Apply suggestion from @adriendupuis --- .../clustering/clustering_with_ddev.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 57b4187d50..c5b023920b 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -33,16 +33,18 @@ To run an [[= product_name_cloud =]] project locally, you may refer to [DDEV and The following sequence of commands: -1. Set some variables to distinguish between Varnish versions, here for Varnish 7.1 -2. Copy and customize VCL files in `.ddev/varnish/` (which is mounted as `/etc/varnish/` into the container) +1. Sets a variable with the desired Varnish version, here Varnish 7.1 +2. Copies and customizes `parameters.vcl` file in `.ddev/varnish/` (which is mounted as `/etc/varnish/` into the container) - set `web` container has the backend host and an invalidator (so back office can purge cache) - add "all IPs" CIDR notation to `debuggers` list to allow debugging info from any IP - on Varnish 7, enable logging of access control list matching for both `invalidators` and `debuggers` lists (new Varnish 7 syntax, it was enabled by default on previous versions) -3. Set the Varnish version to use and its demon starting parameters to use the files -4. Adds the Varnish container -5. Sets Varnish as the HTTP cache server -6. Restarts the DDEV cluster +3. Sets main `varnish*.vcl` file to use and "path to VCL directory" argument name depending on Varnish version +4. Copies the main VCL file to `.ddev/varnish/` +5. Sets the Varnish version to use and its demon starting parameters to use the files +6. Adds the Varnish container +7. Sets Varnish as the HTTP cache server +8. Restarts the DDEV cluster and clear the Ibexa DXP cache ```bash VARNISH_VERSION=7.1 From 1fa68044660367535a2ccf428867f647588d061d Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 21 Jan 2026 09:30:37 +0100 Subject: [PATCH 16/19] Apply suggestion from @adriendupuis --- .../clustering/clustering_with_ddev.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index c5b023920b..0792622fc3 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -44,7 +44,7 @@ The following sequence of commands: 5. Sets the Varnish version to use and its demon starting parameters to use the files 6. Adds the Varnish container 7. Sets Varnish as the HTTP cache server -8. Restarts the DDEV cluster and clear the Ibexa DXP cache +8. Restarts the DDEV cluster and clear the [[= product_name =]] cache ```bash VARNISH_VERSION=7.1 From 528563b6cb413f1e42313f6369ad96662b84834d Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 21 Jan 2026 13:13:54 +0100 Subject: [PATCH 17/19] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marek Nocoń --- .../clustering/clustering_with_ddev.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 624c508f69..2de050df01 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -34,9 +34,9 @@ To run an [[= product_name_cloud =]] project locally, you may refer to [DDEV and The following sequence of commands: 1. Sets a variable with the desired Varnish version, here Varnish 7.1 -2. Copies and customizes `parameters.vcl` file in `.ddev/varnish/` (which is mounted as `/etc/varnish/` into the container) - - set `web` container has the backend host and an invalidator (so back office can purge cache) - - add "all IPs" CIDR notation to `debuggers` list to allow debugging info from any IP +2. Copies and customizes `parameters.vcl` file in `.ddev/varnish/` (which is mounted as `/etc/varnish/` into the container): + - sets `web` container as the backend host and an invalidator (so back office can purge cache) + - adds "all IPs" CIDR notation to `debuggers` list to allow debugging from any IP - on Varnish 7, enable logging of access control list matching for both `invalidators` and `debuggers` lists (new Varnish 7 syntax, it was enabled by default on previous versions) 3. Sets main `varnish*.vcl` file to use and "path to VCL directory" argument name depending on Varnish version @@ -81,6 +81,7 @@ To use Varnish 6.0LTS, set the following variable instead: ```bash VARNISH_VERSION=6.0 +``` If you're using [Apache as web server](install_with_ddev.md#switch-to-apache-and-its-virtual-host), you must set `varnish` as a trusted proxy in `.ddev/apache/apache-site.conf` before restarting DDEV: @@ -91,7 +92,7 @@ sed -i 's/#SetEnv TRUSTED_PROXIES ""/SetEnv TRUSTED_PROXIES "varnish"/' .ddev/ap ddev restart ``` -The Varnish server replace the web server in some places. +The Varnish server acts as the application’s primary entry point. If you run `ddev describe`, you can see that Varnish is now the one responding to DDEV domain `.ddev.site` while the web server still replies to `127.0.0.1` with its own ports. @@ -108,7 +109,7 @@ x-cache-debug: 1 x-cache-hits: 5 x-cache-ttl: 87654.321 x-debug-token: 012345 -x-debug-token-link: https://ddev-ibexa-tmp2.ddev.site:8443/_profiler/012345 +x-debug-token-link: https://.ddev.site://_profiler/012345 x-powered-by: Ibexa Commerce v5 x-robots-tag: noindex x-varnish: 12345 67890 @@ -138,13 +139,13 @@ For Fastly (as for [[[= product_name_connect =]]](https://doc.ibexa.co/projects/ To use [ngrok](https://ngrok.com/) alongside [`ddev share`](https://docs.ddev.com/en/stable/users/topics/sharing/#using-ddev-share-easiest) is probably the easiest way to achieve this. -Be careful when making a local development instance visible from Interne. -For example, +Be careful when making a local development instance visible from the internet. +For example: -- close ngrok tunnels when not needed anymore, -- don't communicate your ngrok URL to unintended people, -- don't use it for live demo on shared screen, -- don't store it on a Fastly or [[= product_name_connect =]] account used by external people… +- close ngrok tunnels when not needed anymore +- keep your ngrok URL private and share it only with trusted recipients +- don't use it for live demo where the URL could be seen +- don't store it on a Fastly or [[= product_name_connect =]] accounts used by external people ## Install search engine From e3bfc130fa8ece513e2a0662b805d007ee85bd76 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:27:58 +0100 Subject: [PATCH 18/19] Apply suggestions from code review --- .../clustering/clustering_with_ddev.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md index 2de050df01..302a1d8a29 100644 --- a/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md +++ b/docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md @@ -29,6 +29,8 @@ To run an [[= product_name_cloud =]] project locally, you may refer to [DDEV and ## Install reverse proxy +A reverse proxy can be added to the cluster to have [HTTP cache](http_cache.md). + ### Varnish The following sequence of commands: @@ -60,9 +62,6 @@ if [[ $VARNISH_VERSION == 7.* ]]; then elif [[ $VARNISH_VERSION == 6.* ]] vcl_path=vcl_dir vcl_file=varnish6.vcl -elif [[ $VARNISH_VERSION == 5.* ]] - vcl_path=vcl_dir - vcl_file=varnish5.vcl fi cp vendor/ibexa/http-cache/docs/varnish/vcl/$vcl_file .ddev/varnish/ ddev dotenv set .ddev/.env.varnish --varnish-docker-image=varnish:$VARNISH_VERSION --varnish-varnishd-params " -p $vcl_path=/etc/varnish -f /etc/varnish/$vcl_file" @@ -124,6 +123,8 @@ You can see how the `web` server is responding to `varnish`: