BoldGrid / w3-total-cache

GNU General Public License v2.0
152 stars 85 forks source link

Support self-hosted CDN for path-/domain-based multisites #394

Open caugner opened 3 years ago

caugner commented 3 years ago

We use a self-hosted CDN (proftpd on Ubuntu 20.04) and have, among others, a WordPress multisite network (example.org) that has both path-based and domain-based sites:

Unfortunately the "self-hosted CDN" feature of W3 Total Cache doesn't seem to support multisites properly:

  1. There is no option to upload all media files for all sites.
  2. Attachment links are replaced, even if "Host attachments is disabled (due to "Use single network configuration file for all sites").
  3. The CDN links don't account for the site paths or domains, so that the following all link to the same (missing) CDN file (https://cdn.example.org/files/2020/example.jpg):
    • https://example.org/files/2020/example.jpg
    • https://example.org/acme/files/2020/example.jpg
    • https://example-acme.org/files/2020/example.jpg

Note that we have "Use single network configuration file for all sites" enabled, because most of our site users don't have the knowledge to setup a CDN themselves, and we want to provide a single CDN for everyone.

mavas84 commented 3 years ago

Hello @caugner Sorry for the late reply. We'll make sure to test this and get back to you once we have more details. Thanks!