Ibexa DXP with Fastly
On this page
Ibexa DXP is a “commercial extended” version of Ibexa OSS that includes, among other things, support for push-based purging on the Fastly CDN.
In Ibexa DXP, Varnish is enabled by default when deploying on Platform.sh To use Fastly, Varnish must be disabled:
- Remove environment variable
TRUSTED_PROXIES: "REMOTE_ADDR"in `.platform.app.yaml
- Remove the Varnish service in
.platform/routes.yaml, change routes to use
appinstead of the
varnishservice you removed in previous step:
- upstream: "varnish:http"
+ upstream: "app:http"
Ibexa DXP’s documentation includes instructions on how to configure Ibexa DXP for Fastly. Follow the steps there to prepare Ibexa DXP for Fastly.
The best way to provide the Fastly credentials and configuration to Ibexa DXP on Platform.sh is via environment variables. That way private credentials are never stored in Git.
Using the CLI, run the following commands to set the configuration on your production environment
(assumed to be
main below, but change it to fit your setup).
(Note that they inherit to all other environments by default unless overridden.)
platform variable:create -e main --level environment env:HTTPCACHE_PURGE_TYPE --value 'fastly'
platform variable:create -e main --level environment env:FASTLY_SERVICE_ID --value 'YOUR_ID_HERE'
platform variable:create -e main --level environment env:FASTLY_KEY --value 'YOUR_ID_HERE'
YOUR_ID_HERE with the Fastly Service ID and Key obtained from Fastly.
Note: On a Dedicated Gen 2 cluster, set those values on the
platform variable:set -e production env:HTTPCACHE_PURGE_TYPE fastly
platform variable:set -e production env:FASTLY_SERVICE_ID YOUR_ID_HERE
platform variable:set -e production env:FASTLY_KEY YOUR_ID_HERE
There are two VCL files provided as starting points for using Fastly with Ibexa DXP;
you can find them in
A VCL snippet can be found in
They handle varying cache by user context hash (permissions)
as well as several other needs by Ibexa DXP and it’s underlying HttpCache system.
See the alternate Go-live process for Fastly on Platform.sh. This process is the same for any application.