CDPCDN is available in three forms.
This page explains what each form contains today, how it is switched on and off, and what is still in preparation.
Note on the examples: <CDN_HOST>, <DRIVE_HOST> and <STORAGE_HOST> stand for the host names of your own installation, e.g. cdn.example.com, drive.example.com and storage.example.com;<ZONE> is the zone name (normally the project or bucket name).
Overview of the offering forms
| Form | Status | Activate / deactivate |
|---|---|---|
| Standalone product on your own domains | available | setting module_cdn on/off |
| Module for CDP (ControlDeskPanel) | in preparation | planned: activate/deactivate in CDP |
| Module for CDPCMS | available through the CDPCMS module "CDPDrive" | CDPCMS module list |
The application is licensed once per installation (one-time purchase, no subscription).
The licence file lists the products storage, drive and cdn;
a module that is not licensed answers with HTTP 503.
Prices are not part of this documentation.
Standalone product on your own domains
CDPCDN is installed together with CDPDrive and CDPStorage on your own server.
The installer expects three host names:
cdpdrive-install <DRIVE_HOST> <STORAGE_HOST> <CDN_HOST> --licence=<licence file>
It creates folders and keys, the database, the configuration (the host names are written to .env as CDPDRIVE_HOST_DRIVE, CDPDRIVE_HOST_STORAGE and CDPDRIVE_HOST_CDN), one web server entry per host, the background jobs and the first storage node.
Domain setup
- Choose a host name for delivery, e.g. cdn.example.com, and create DNS records of type A (and AAAA if your server has IPv6) that point to your server. Do the same for the Drive and Storage hosts.
- Obtain a TLS certificate for each host before running the installer; the web server entries expect the certificate in the usual certificate folder of the host name.
- Run the installer with the three host names. The CDN host is then served over HTTPS on port 443; plain HTTP is redirected to HTTPS.
- Optional: per project you can enter an own domain (alias host) under project settings → Advanced. The application recognises this host, but its DNS record, web server entry and certificate are not created automatically.
Switching the module on and off
In the web interface under Settings → Modules the switch "CDN module (delivery, image sizes)" controls the setting module_cdn.
Off means: the CDN host answers every request with HTTP 503;
all files, zones and settings are kept and are delivered again as soon as the module is switched back on.
Branding
The code currently has no branding options for the CDN host (no own logo, colours or name per installation for the delivery pages).
Branding is in preparation.
Delivered files themselves carry no branding –
they are served exactly as stored or as scaled images.
Module for CDP (ControlDeskPanel)
A CDPCDN module for CDP is in preparation.
The planned behaviour: the module is activated or deactivated in CDP, and zones are then managed from there.
This form is not available yet.
Module for CDPCMS
There is no separate CDPCMS module for CDPCDN.
CDPCDN is used in CDPCMS through the CDPCMS module CDPDrive, which is activated or deactivated in the CMS module list.
On activation the module asks you to enter the connection under CDPDrive → Connection;
on deactivation the connection is switched off and its settings are kept.
- Connection page: switch on/off, Drive host, Storage endpoint, CDN host, project (bucket), access key id and secret access key (stored encrypted), region (default eu-fra), plus a Button "Test connection".
- Media picker: in the editor the Button "CDPDrive" opens the picker of your Drive host; the chosen file is inserted with its CDN address (with srcset for images).
- Template helpers:
cdpdrive_url('products/product-01.png')returns the CDN address,cdpdrive_srcset('products/product-01.png')a srcset string for 480/960/1440. - Command:
php artisan cdpdrive:push [--site=] [--prefix=] [--dry-run]uploads the folder/core/assets/gfxof a website to the project over the S3 API and skips unchanged files.
When the connection is off or a file is unknown, the helpers fall back to the local path under /core/assets/gfx/, so a website keeps working.