2014-03-06 2 views
5

나는 달성하기 위해 노력하고이 :HAProxy : 하위 디렉토리/하위 경로/하위 폴더가있는 백엔드?

http://front-end  --> http://back-end/app-1 
http://front-end/app-2 --> http://back-end/app-2-another-path 

요청이 방식으로 처리 될 수 있도록 :

http://front-end/do-this  --> http://back-end/app-1/do-this 
http://front-end/app-2/do-that --> http://back-end/app-2-another-path/do-that 

내가 어떻게 할 수 있습니까? 고맙습니다.

답변

11

다음과 같은 구성이 "http://front-end/app-2/do-that --> http://back-end/app-2-another-path/do-that"을 얻을 수 있습니다

frontend http 
    #match url ending with /xxxxx/do-that 
    acl do-that path_end -i /app-2/do-that 

    use_backend server1 if do-that 

backend server1 
    reqirep ^([^\ :]*)\ /app-2/(.*)  \1\ /app-2-another-path/\2 
    server server 168.192.X.X 

Herereqirep에 대한 자세한 정보입니다.

관련 문제