Nginx Redis Cache not working with new ee-nginx version
olegcarguy opened this issue · 2 comments
(Creating new issue because the original issue is in a closed state so not sure if @VirtuBox saw this).
Hi @VirtuBox , I just compiled without the ngx_http_redis module and while the compile worked, my NGINX caching is now broken. (I run wordops but use nginx-ee to compile nginx because I need to add the Modsecurity module.)
After successful compile, nginx -t failed with: nginx: [emerg] unknown directive "redis_pass" in /etc/nginx/common/redis-php73.conf:26
so then I changed redis_pass to redis2_pass. This allowed nginx -t to pass. After doing this and testing on my site, I always see x-srcache-fetch-status MISS
Debugging NGINX shows this error now:
2022/10/06 12:05:24 [error] 24473#24473: *1 no redis2 query specified or the query is empty, client: 73.94.187.209, server: dev.wholesomeyum.com, request: "GET /recipes/sugar-free-maple-syrup/ HTTP/2.0", subrequest: "/redis-fetch", host: "dev.wholesomeyum.com", referrer: "https://dev.wholesomeyum.com/"
When I check redis cache, I see the page that I'm testing against show up in redis cache correctly.
Do you think the problem is that ngx_http_redis is actually needed in some way? Or the caching config needs to be changed more to reflect the removal of this module?
Any help you can provide will be great as I'm stuck.
Originally posted by @olegcarguy in #122 (comment)
Hello @olegcarguy,
thanks for providing this feedback, I haven't be able to run tests with the redis2-nginx-module to make sure it can replace the previous ngx_http_redis module yet.
I will take a look on this in the next few days.
Hello @olegcarguy,
ngx_http_redis module is back in nginx-ee, thanks to https://github.com/centminmod/ngx_http_redis.