./categories/server
Apache mod_proxy vs mod_jk
mod_jk가 정상이면 교체 불필요. mod_proxy는 별도 모듈 빌드·workers 파일 없이 사용(Apache 2.2+).
mod_proxy_ajp는 8KB 이상 바디 이슈 보고 → 그때는 mod_jk 또는mod_proxy_http.
AJP
ProxyPassMatch ^/(.*\.jsp)$ ajp://localhost:8009/$1
ProxyPassReverse / ajp://localhost:8009/
HTTP (Tomcat AJP connector 불필요)
ProxyPassMatch ^/(.*\.jsp)$ http://localhost:8080/$1
ProxyPassReverse / http://localhost:8080/
정적 제외 / 선택 프록시
ProxyPass /images !
ProxyPass /css !
ProxyPass / http://backend.example.com/
ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com/$1
VirtualHost 예
<VirtualHost *:80>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>
참고
관련 링크: https://jfrom.tistory.com/entry/modjk-%EB%8C%80%EC%8B%A0-modproxy%EC%82%AC%EC%9A%A9
./comments