• Resolved Terence Milbourn

    (@pubdirltd)


    My images are stored in a DigitalOcean Space and delivered via their CDN from an S3 endpoint configured DNS cname, as a custom domain, using an SSL certificate provided by DigitalOcean.

    i.e. CNAME subdomain.domain.tld is an alias of bucketname.ams3.digitaloceanspaces.com.

    The problem: I can see the images are uploaded to the bucket, and visible in WordPress, but as soon as I activate the custom domain, the thumbnails 404 and disappear from the image library.

    Can you give me some trouble-shooting ideas to try. I think I have tried just about everything already — but obviously I haven’t.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Delicious Brains

    (@deliciousbrains)

    Please confirm whether you followed this guide?

    https://deliciousbrains.com/wp-offload-media/doc/digitalocean-spaces-cdn-setup/

    -IJ

    Thread Starter Terence Milbourn

    (@pubdirltd)

    Yes, I found and followed that, as far as I know, to the letter.

    Thread Starter Terence Milbourn

    (@pubdirltd)

    I am using…

    CNAME media.horseboxheaven.uk

    Plugin Author Delicious Brains

    (@deliciousbrains)

    I can’t see any offloaded images on the site at the moment, presumably you’ve turned off URL rewriting while trying to resolve this?

    If so, please could you turn off the “Custom Domain (CNAME)” setting, turn on “Rewrite Media URLs”, and Save Changes.

    Please then check that media is being served from the raw bucket (Spaces) URLs.

    Reply here when done, and when I get a chance I’ll take another look at the site and see what’s up.

    I’m assuming that the CDN subdomain attached to the bucket is “media.horseboxheaven.uk” as mentioned above, but if that’s not correct, please tell us what it actually is.

    -IJ

    Thread Starter Terence Milbourn

    (@pubdirltd)

    If you check now you’ll see…

    “Custom domain” is deactivated and “Rewrite Media URLs” is on.

    The CDN subdomain attached to the bucket is “media.horseboxheaven.uk”.

    The 472 media library items stored as 3,604 items (233.4MB) in the Space, are all being served from the raw bucket URLs.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Looks like images are offloaded and the CDN is enabled, however there is a problem with the certificate.

    ian@ians-tuxedo:~/Support $ curl -I https://hbh-media.ams3.digitaloceanspaces.com/wp-content/uploads/2020/01/14153430/post-image-5.jpg
    HTTP/1.1 200 OK
    content-length: 312092
    accept-ranges: bytes
    last-modified: Tue, 15 Mar 2022 11:27:48 GMT
    x-rgw-object-type: Normal
    etag: "b01f55b9f14576420491a37ef08f2279"
    cache-control: max-age=31536000
    x-amz-request-id: tx0000000000000141e16b3-006231cf06-1d147b7f-ams3c
    content-type: image/jpeg
    date: Wed, 16 Mar 2022 11:50:30 GMT
    vary: Origin, Access-Control-Request-Headers, Access-Control-Request-Method
    strict-transport-security: max-age=15552000; includeSubDomains; preload
    
    ian@ians-tuxedo:~/Support $ curl -I https://hbh-media.ams3.cdn.digitaloceanspaces.com/wp-content/uploads/2020/01/14153430/post-image-5.jpg
    HTTP/1.1 200 OK
    Date: Wed, 16 Mar 2022 11:55:15 GMT
    Connection: Keep-Alive
    Accept-Ranges: bytes
    Content-Length: 312092
    Content-Type: image/jpeg
    X-HW: 1647431714.dop023.lo4.t,1647431714.cds278.lo4.shn,1647431714.dop023.lo4.t,1647431715.cds285.lo4.p
    x-rgw-object-type: Normal
    etag: "b01f55b9f14576420491a37ef08f2279"
    cache-control: max-age=31536000
    x-amz-request-id: tx0000000000000141b3e2d-006231d023-1d14aa62-ams3c
    strict-transport-security: max-age=15552000; includeSubDomains; preload
    Last-Modified: Tue, 15 Mar 2022 11:27:48 GMT
    
    ian@ians-tuxedo:~/Support $ curl -I https://media.horseboxheaven.uk/wp-content/uploads/2020/01/14153430/post-image-5.jpg
    curl: (60) SSL: no alternative certificate subject name matches target host name 'media.horseboxheaven.uk'
    More details here: https://curl.se/docs/sslcerts.html
    
    curl failed to verify the legitimacy of the server and therefore could not
    establish a secure connection to it. To learn more about this situation and
    how to fix it, please visit the web page mentioned above.
    ian@ians-tuxedo:~/Support $

    You’ll need to try and fix that certificate on the CDN, maybe with DigitalOcean support’s help.

    -IJ

    Thread Starter Terence Milbourn

    (@pubdirltd)

    The CNAME is now fully propagated, however — for example — the image https://hbh-media.ams3.digitaloceanspaces.com/wp-content/uploads/2022/03/17205453/horsebox-min.jpg still only loads from the raw bucket, but not when the CNAME is activated, and 404s from https://media.horseboxheaven.uk/wp-content/uploads/2022/03/17205453/horsebox-min.jpg

    Plugin Author Delicious Brains

    (@deliciousbrains)

    The default CDN URL also works…

    https://hbh-media.ams3.cdn.digitaloceanspaces.com/wp-content/uploads/2022/03/17205453/horsebox-min.jpg

    But the certificate on media.horseboxheaven.uk doesn’t have a correct domain name set…

    curl -I https://media.horseboxheaven.uk/wp-content/uploads/2022/03/17205453/horsebox-min.jpg
    curl: (60) SSL: no alternative certificate subject name matches target host name ‘media.horseboxheaven.uk’

    Please contact DigitalOcean for support.

    -IJ

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Trouble-shooting custom domain’ is closed to new replies.