일상+

아파치 + 톰캣 프록시 연동 본문

컴퓨터공학

아파치 + 톰캣 프록시 연동

이종준 2015. 8. 5. 13:25

* 아파치 conf 파일설정


<VirtualHost *:80>

   DocumentRoot "/home/webapp"

   ServerName test.com

   ServerAlias test.com

   ReWriteEngine     on

   <Proxy balancer://jejunet_cms>

       BalancerMember ajp://localhost:8009 loadfactor=1

       ProxySet lbmethod=byrequests

   </Proxy>

   RewriteRule ^/(.*) balancer://jejunet_cms/$1 [P,L]

   ErrorLog "|/usr/local/sbin/cronolog /data/logs/jejunet_cms_log/error-log/error_log.%Y%m%d%H"

   CustomLog "|/usr/local/sbin/cronolog /data/logs/jejunet_cms_log/access-log/access_log.%Y%m%d%H" combined env=!do_not_log

   ErrorDocument 401 /

   ErrorDocument 403 /

   ErrorDocument 404 /

   ErrorDocument 500 /

   ErrorDocument 503 /

</VirtualHost>



* 톰캣 server.xml 설정


<Connector port="8009" enableLookups="false" redirectPort="8443" maxThreads="1024"

             minSpareThreads="125" acceptCount="500" protocol="AJP/1.3" URIEncoding="UTF-8" maxPostSize="-1" maxParameterCount="-1"/>


Comments