srcache-nginx-module icon indicating copy to clipboard operation
srcache-nginx-module copied to clipboard

srcache with redis in nginx loadbalancer

Open dipenpatel235 opened this issue 9 years ago • 3 comments

how to used srcache redis in loadbalancer ?

can u please provide some example ?

Thanks

dipenpatel235 avatar Dec 12 '16 12:12 dipenpatel235

@dipenpatel235 I cannot really parse your question. It's just too vague.

agentzh avatar Dec 12 '16 19:12 agentzh

ok..let me explain with my real example

see my current working below two configuration file without redis and srcahce.

hosted_site_nginx_without_redis.txt loadbalancer_without_redis.txt

Now i have setup srcache and redis in loadbalancer as per below loadbalancer nginx config file and hosted nginx is same as above without redis.

loadbalancer_with_redis.txt

But using that i get error 404 for all .js and .css .png files So i have confusion how to use sr cache with redis in load balancer ?

Let me know if you have still confusion..

Thanks...

dipenpatel235 avatar Dec 13 '16 09:12 dipenpatel235

@dipenpatel235 This module works out of the box with your locations configured with fastcgi_pass and etc. This module also works with redis. See the official docs:

https://github.com/openresty/srcache-nginx-module#caching-with-redis

It seems that everything is already documented.

agentzh avatar Dec 13 '16 21:12 agentzh