M
M
mulligan2015-10-31 23:01:38
Nginx
mulligan, 2015-10-31 23:01:38

Is it possible to choose with my nginx what Cloudflare will give?

The fact is that the site is still at the design stage and the logic strongly depends on whether the following happens:
1) The user makes a request to the page, for example, mysite.com/2193021
2) Cloudflare forwards this request to my host's nginx
3) My nginx checks if this id exists in redis
--- a) If it does, gives what php-fpm will generate
--- b) If not, tells Cloudflare to give the page from its cache
Actually, is it possible to do this? I had no business with Cloudflare, I only read a couple of manuals.
There is an option to return some kind of error code to which the static page is attached, something like 404. But it is important for me that it reaches the user with the 200 code and without redirects.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2015-10-31
@mulligan

By definition
, CF has several centers, 14 types + -, and each has its own cache,
if it is not in the cache - it pulls the site, if it exists - it gives it out of the cache
if suddenly it will be possible to "tell" it - what will it give back?
what you want is the cheapest here: https://www.ovh.ie/cdn/webstorage/
you can, in principle, feed cloudflare from there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question