728x90
HAProxy 패스워드 설정
haproxy.cfg 편집
$ vim /etc/haproxy/haproxy.cfg
...
#---------------------------------------------------------------------
userlist basic-auth
#user elastic password ZWxhc3RpYzplbGFzdGlj
user elastic insecure-password elastic
user guest insecure-password guest
#---------------------------------------------------------------------
frontend www-lb
bind *:80
mode http
http-request set-header X-Forwarded-Proto http
log global
option httplog
#option dontlog-normal
#option dontlognull
acl acl_elasticsearc path_beg -i /es
use_backend elasticsearch9200 if acl_elasticsearc
default_backend kibana5601
#---------------------------------------------------------------------
backend kibana5601
acl acl_kibana5601 http_auth(basic-auth)
http-request auth if !acl_kibana5601
mode http
balance roundrobin
cookie SERVERID insert indirect nocache
option httpchk GET /
http-check expect status 302
#option httpchk GET "/app/kibana#?_g=()"
#http-check expect string "Kibana"
#default-server inter 10s downinter 5s rise 2 fall 2 slowstart 60s maxconn 250 maxqueue 256 weight 100
#server datanode01 192.168.0.101:5601 check inter 3000 rise 2 fall 5
server datanode01 192.168.0.101:5601 check cookie s1
server datanode03 192.168.0.102:5601 check cookie s2
...
사용자 및 패스워드 지정
userlist basic-auth
#user elastic password ZWxhc3RpYzplbGFzdGlj
user elastic insecure-password elastic
user guest insecure-password guest
백엔드 접근 제어
acl acl_kibana5601 http_auth(basic-auth)
http-request auth if !acl_kibana5601
웹 페이지 접근 시 팝업
728x90
'리눅스' 카테고리의 다른 글
[draft] 웹 프록시 자동 검색 프로토콜을 적용하는 방법 (0) | 2021.12.03 |
---|---|
[리눅스] elasticsearch 클러스터 구성에서 인덱스 생성 (0) | 2021.12.02 |
[draft] mkpasswd 명령어 (0) | 2021.12.02 |
[Linux] How to build and push Docker images with GitHub Actions (0) | 2021.11.30 |
Installing a package to use the Kafka command(kafka-topics.sh) (0) | 2021.11.30 |