Redis 绑定多个IP [英] Redis bind to more than one IP

查看:43
本文介绍了Redis 绑定多个IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在redis.conf中正常设置是

In the redis.conf the normal setting is

绑定 127.0.0.1

bind 127.0.0.1

我也想让redis监听另一个ip(说我本地开发地址)

I want redis to listen to another ip too (say my local development address)

我试过了

绑定 127.0.0.1、123.33.xx.xx

bind 127.0.0.1, 123.33.xx.xx

但这不起作用.我在文档或谷歌搜索中找不到任何相关内容.希望有人能帮忙.

but this does not work. I cannot find any relevant in the document or by googling. Hope someone can help.

推荐答案

从 Redis 2.8 开始确实可以绑定到多个 IP.只需用空格(不是逗号)分隔每个 IP.

Binding to multiple IPs is indeed possible since Redis 2.8. Just separate each IP by whitespace (not commas).

bind 127.0.0.1 123.33.xx.xx

来源:官方默认配置

这篇关于Redis 绑定多个IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆