1. 개요
mod_proxy 설정
2. 설정
2-1. mod_proxy_http
2-2. mod_proxy_ftp
ProxyPass /ftp_folder ftp://127.0.0.1
서버에 ftp 서버가 실행 중이어야 한다.
3. 활용
3-1. Active-Standby 구성
<Proxy balancer://tomcatCluster>
BalancerMember http://10.0.10.101:8080 retry=30
BalancerMember http://10.0.10.102:8080 status=+H retry=0
</Proxy>
ProxyPassMatch ^/(.*\.jsp)$ balancer://tomcatCluster/
4. 자주 겪는 문제
4-1. Invalid command 'ProxyPassMatch', perhaps misspelled or defined by a module not included in the server configuration
AH00526: Syntax error on line 1 of /sw/httpd-2.4.29/conf/extra/httpd-proxy.conf: Invalid command 'ProxyPassMatch', perhaps misspelled or defined by a module not included in the server configuration
ProxyPass 설정을 하였는데 위와 같은 오류가 발생하면, mod_proxy*.so 파일이 Include 되어 있는지 확인한다.
4-2. 500 Internal Server Error
mod_proxy_http.so 파일이 Include 되어 있는지 확인한다.
4-3. 503 Service Unavailable
웹서버에서 backend에 접속이 가능한지 확인한다.
4-4. AH01144: No protocol handler was valid for the URL /test.jsp (scheme 'balancer'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
mod_proxy_balancer.so 파일이 Include 되어 있는지 확인한다.
4-5. AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
mod_slotmem_shm.so 파일이 Include 되어 있는지 확인한다.
4-6. AH02432: Cannot find LB Method: byrequests
mod_lbmethod_byrequests.so 파일이 Include 되어 있는지 확인한다.