Cloudflare x Backblaze 404 Not Found nginx Error

For a good while, I’ve been using Cloudflare to proxy file downloads from a Backblaze B2 bucket (based on this setup). This has worked with no issues for ages, but recently I’ve started getting “404 Not Found nginx” errors.

Any ideas what might be happening here and how to fix it? Is this a Cloudflare issue or a Backblaze issue?

Just in case, may I ask have you checked if the physical files actually are present there and not hidden in the correct bucket?

Could it be if a user is out of the “free tier of 10GB per month traffic”?

Are you getting this by uploading, or downloading, or while using some software like Borg or Duplicacy for a backup from your origin to your bucket?

The files are definitely still there - if I use the non-Cloudflare URL the downloads works as expected. It’s only when using the proxied Cloudflare URL that things don’t work.

Here’s an example: https://f002.backblazeb2.com/file/ELPHNT/free-downloads/FREE.zip works fine. https://files.elphnt.io/file/ELPHNT/free-downloads/FREE.zip = 404.

This exact same setup was working fine a week ago.

The thing here is, you get 404 not found from nginx.

Is the Bucket Public?

Next one, Page Rule from your article/tutorial above - at least for me - when setup it was redirecting each request to Backblaze 404 page - different one than yours 404 nginx (https://secure.backblaze.com/404notfound).

Try temporarly turning of / removing, both of the Page Rules.
Does anything change?

Furthermore, test from my side:
https://f003.backblazeb2.com/file/fritexpub/test_file.txt → works

https://blaze.tomislavnovak.com.hr/file/fritexpub/test_file.txt → works

From the article you specified I’ve done slightly different, this:

  1. Sign-up for Backblaze B2
  2. Verified my e-mail and added phone and activated 2FA
  3. Created a new public bucket named “fritexpub” → maybe this is the thing at your situation?
  4. Uploaded a file
  5. Created a CNAME record blaze and pointed it to f003.backblazeb2.com
  6. Made it to be proxied (:orange: cloud)
  7. My SSL/TLS settings for this domain for this test is on Full SSL (not Strict)
  8. No Page Rules configured

Screenshots for help:

Not sure what is going on by you, hope this above mine example helps a bit.

Can you post a screenshot of that? Sometimes I’ve seen a 404 that came from Cloudflare itself.

Thanks for all that info, but unfortunately no dice. My set-up is exactly the same as yours and exactly the same as the one I’ve been using for years now with no issues… Bucket is public, etc. Everything works exactly as expected from the Backblaze side - if I go to the Backblaze URL the file downloads fine, so it seems like it must be something on the Cloudflare end. For now, I’ve just replaced all the Cloudflare proxied URLs on my site with the direct Backblaze ones, but would obviously love to get it back to working via Cloudflare as it had been.

404

So, you actually have a CNAME files and a bucket ELPHNT, and inside this bucket is free-downloads in which is the FREE.zip located (true, the link to bucket is working)?

Maybe the wrong content-type is being served via Cloudflare for that .zip file?

I just wonder, if you set it up for 24 hours to unproxied :grey: cloud, if in case the SSL somehow, needs to be renewed? - not sure if that could have some impact, if so.

I think @sdayman meant the screenshot from the DNS tab / Page Rules of your Cloudflare dashboard - could be I am wrong about it.

Nevertheless, makes me think a bit, you are using .io TLD domain.
Could it have some “different tollerance” from Cloudflare for this?, for example “.io default usage for something”, just like most of the .dev TLDs are meant for like Pages or something other as GitLab, but again it’s not a general statement and a rule “one for all”.

I was looking for the 404 error, and that was it. I see it’s definitely coming from the server. I looked up Cloudflare docs, and theirs come from a ‘cloudflare’ server instead of ‘nginx’, as illustrated at the bottom of this page:
https://support.cloudflare.com/hc/en-us/articles/115003011431-Cloudflare-5XX-errors

1 Like

Hmm, interesting. So probably not a Cloudflare thing then. I’ll check in with my web host. Thanks for diving into that :+1:

1 Like

Just one more thing, in my example, there is a naked domain (non-www) and www A record type. Meaning, I have only this (one) CNAME record at my DNS tab for backblaze.

In some setups, I remember people having one or multiple CNAME records, like CNAME www to naked domain record or vice-versa and/or some other sub-domains.

Furthermore, I am not sure if it is possible, but due to CNAME Flattening option, could it have some impact on this too?

  • like treat that CNAME as it’s on the origin hosts/server, instead of actually going to the backblaze one… which would look into the your domain server and return 404 nginx from it, rather continue going to the backblaze, if so …

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.