2017-04-21 18 views
1

안녕하세요, haproxy의 특정 URL을 백인 목록에 표시하고 싶습니다.당신은 haproxy로 URL을 허용 할 수 있습니까?

foobar.com/mypages/* 만 액세스 할 수 있습니다.

foobar.com에서 차단해야하는 항목은 모두 차단해야합니다.

haproxy가 제공하는 기능을 제공합니까?

덕분에, 밥

답변

3

당신이 원하는 결과를 얻기 위해 다음과 같은 구성을 시도 할 수 있습니다 :

#Will set the ACL if path matches 
acl allowed_url path_reg */mypages/* 

#Based on the previouslt set ACL , we can reject or allow connections 
#Accept/whitelist if matches 
tcp_request connection accept if allowed_url 
#Reject if not 
tcp_request connection reject if !allowed_url 

는 ACL 지시어와 일치하는 다른 경로가 있습니다 Path-directives을 가장하는 경우 적합한 하나 .Use.

+0

매우 도움이됩니다. 감사합니다. –