-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do you use redis with password? #60
Comments
@onnimonni Both ngx_redis and ngx_redis2 should support passwords. Please read their official documentation more carefully. |
Thanks for your help! I think I have read through them a hundred times already, but what I missed was the following redis command: http://redis.io/commands/AUTH. I will try this soon but does the authentication work like this?
I think I missed the following one?
Side topic:
Is there better ways than this? Thanks in advance! Thanks for creating such useful tools :)! |
And I did also read the ngx_redis readme: https://www.nginx.com/resources/wiki/modules/redis/#variables And I can't really figure it out. There's only mention of these two variables:
But no mentioning about pipelines or arguments or anyway to provide the |
I managed to do this finally using this fork of the redis module: https://github.com/Yongke/ngx_http_redis-0.3.7 |
@onnimonni Oh, I didn't know the official ngx_redis module does not support auth variables. Will you ask the original author of ngx_redis to add support for it? Many thanks! |
Np! I'll report this to nginx. |
This can be tracked over here: https://trac.nginx.org/nginx/ticket/1120#ticket |
I am afraid you are reporting to the wrong place. ngx_redis is not a standard nginx module but a 3rd party module. You should contact the author of that module instead of the official nginx team. |
You are right and I contacted the ngx_http_redis module author: [email protected]. I'm afraid that he's not actively developing this module anymore. |
@onnimonni Hmm, seems like it's the time for OpenResty to fork it :) |
That would be excellent :)! Can you update this thread when that happens? Then I can again use the redis module bundled in openresty package. |
Hi guys! Is there any stable version that support redis auth? |
@ksbomj It's been supported in stable releases of ngx_redis2 for 5+ years already. I wonder why you are asking. |
@ksbomj OK, you are referring to ngx_redis. Well, you'll have to ask the author of ngx_redis instead. The ngx_srcache module is an old tech developed 5+ years ago. We're planning a much much better cache software based on OpenResty that can even serve CDN scale networks very well. |
@agentzh the author if ngx_redis didn't move forward with this after I notified him about the issue last year. The problem is that the version I mentioned above: https://github.com/Yongke/ngx_http_redis-0.3.7 is based on a bit older version. (Newest one is 0.3.8). Would you accept a new forked version of I would want to include it in here and I can ask nginx if they would want to use and link to that version instead of the current one. |
@onnimonni OK, maybe we can create an |
Hi @agentzh , i'm looking at options for caching of upstream responses, and was considering this module. I saw your comment : "The ngx_srcache module is an old tech developed 5+ years ago. We're planning a much much better cache software based on OpenResty that can even serve CDN scale networks very well." Got any more info on this? My project is already built on OpenResty (which is great btw), and im just using the "X-Accel-Expires" header and caching in a second downstream OpenResty nginx at the moment. https://github.com/wyvern8/akamai-nginx |
@wyvern8 That would become a commercial cache software provided by OpenResty Inc: |
Hey!
I would really like to use this module but the redis in my environment needs to have authentication turned on.
I tried to solve this by using content_by_lua but don't know how to.
This is what I would want to do but nginx redis or redis2 modules don't support redis passwords:
The text was updated successfully, but these errors were encountered: