목표
# NLB 만들어보자
# ALB 만들어 보자
# ALB에서 /ip로 분기해보자
1
web-nlb-tg 생성
tcp
2
lb 생성
web-nlb
Public
다이나믹 사이즈
3
80 허용
4
확인
1
web-alb-tg
생성
2
alb 생성
web-alb
Public
small
3
80 허용
4
확인
1
# 타깃 그룹 생성
alb-ip-tg
2
# ALB 로드밸런서에서 리스너 설정 변경
ALB > 리스너 설정 변경
규칙/ 조회 변경
규칙 추가
1
조건
path pattern 우측 추가
Path Pattern /ip/
추가
TagetGroup - alb-ip-tg
2
확인
/ip/
1
[root@s107113338 httpd]# cd /etc/httpd/conf
[root@s107113338 conf]# vi httpd.conf
[root@s107113338 conf]# systemctl restart httpd
[root@s107113338 conf]# tail -f /var/log/httpd/access_log
2
set number
201
변경전
# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
3
서버 로그에서 확인
[root@s107113338 conf]# tail -f /var/log/httpd/access_log
https://brunch.co.kr/@topasvga/4855