nginx配置代理指向Redis

stream {
    upstream redis {
        server 127.0.0.1:6379 max_fails=3 fail_timeout=30s;  #*redis-addres*替换为真实地址
    }
    server {
     # 对外暴露端口号 listen
2101; proxy_connect_timeout 1s; proxy_timeout 3s; proxy_pass redis; } }

 

posted @ 2020-11-24 11:17  想念泡凤爪的味道  阅读(2258)  评论(0编辑  收藏  举报