기본적으로 redis는 127.0.0.1만을 수신하며 다른 인터페이스 나 노드에서 수신 대기하도록 redis에 명시 적으로 알려야합니다. 귀하의 배포판에 따라, 이것은 /etc/redis.conf
같은 어딘가에있을 수 있습니다.
redis가 모든 주소 (0.0.0.0
)에서 수신 대기하도록하려면 redis.conf에 proetected-mode no
을 설정해야합니다.
당신은 레디 스를 구성 할 때 는 신의 사랑에 대한 보안 그룹 설정에 있는지 확인하십시오, 당신은 포트가 만에 연결하는 데 필요한 PHP 서버의 IP 또는 보안 그룹에 열려 있는지 정의 redis, 그리고 전 세계에.
# By default, if no "bind" configuration directive is specified, Redis listens
# for connections from all the network interfaces available on the server.
# It is possible to listen to just one or multiple selected interfaces using
# the "bind" configuration directive, followed by one or more IP addresses.
#
# Examples:
#
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1 ::1
#
# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
# internet, binding to all the interfaces is dangerous and will expose the
# instance to everybody on the internet. So by default we uncomment the
# following bind directive, that will force Redis to listen only into
# the IPv4 lookback interface address (this means Redis will be able to
# accept connections only from clients running into the same computer it
# is running).
#
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
# JUST COMMENT THE FOLLOWING LINE.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bind 127.0.0.1
# Protected mode is a layer of security protection, in order to avoid that
# Redis instances left open on the internet are accessed and exploited.
#
# When protected mode is on and if:
#
# 1) The server is not binding explicitly to a set of addresses using the
# "bind" directive.
# 2) No password is configured.
#
# The server only accepts connections from clients connecting from the
# IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain
# sockets.
#
# By default protected mode is enabled. You should disable it only if
# you are sure you want clients from other hosts to connect to Redis
# even if no authentication is configured, nor a specific set of interfaces
# are explicitly listed using the "bind" directive.
protected-mode yes
:
참고로
, 여기 바인딩에 대한 redis.conf의 구성 부분이다