IDC정책상 외부 유입 포트는 하나밖에 오픈이 안된다.
따라서, 아래와 같은 구조로 환경세팅을 해야하는 경우가 되었다.
두개의 도메인 + 하나의 아파치 + 각각 도메인별로 두개의 톰캣 |
이제 설정을 해보자.
1. 아파치의 conf/httpd.conf => 빨간부분을 참고로 설정하면된다
... 중략 ... #LoadModule jk_module modules/mod_jk.so
# #JkMount /servlet/* worker1 <VirtualHost 121.125.xx.xx:80> <= 서버 아이피 <VirtualHost 121.125.73.35:80> |
2. conf/conf.d/tomcat.conf : 위에서 "Include conf.d/*.conf"로 include한 파일
LoadModule jk_module modules/mod_jk.so JkWorkersFile /usr/local/httpd/conf/worker.properties |
3. conf/worker.properties
worker.list=dev1,dev2 worker.dev1.host=dev.quickchannel.kr worker.dev2.host=www.quickchannel.kr |
4. dev1 tomcat의 server.xml
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> <!-- Note : To disable connection timeouts, set connectionTimeout value to 0 --> <!-- Note : To use gzip compression you could set the following properties : compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml" --> <!-- Define a SSL HTTP/1.1 Connector on port 8443 --> <!-- <Connector port="8443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" /> --> <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> |
5. dev2 tomcat의 server.xml
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="8081" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> <!-- Note : To disable connection timeouts, set connectionTimeout value to 0 --> <!-- Note : To use gzip compression you could set the following properties : compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml" --> <!-- Define a SSL HTTP/1.1 Connector on port 8443 --> <!-- <Connector port="8443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" /> --> <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8010" enableLookups="false" redirectPort="8444" protocol="AJP/1.3" /> |
끝
'마니의 공부방 > 개발 꼼수' 카테고리의 다른 글
ie innerhtml (0) | 2011.07.07 |
---|---|
구글 크롬 단축키 (0) | 2011.03.17 |
[excel] 한영 자동변환 기능 끄기 (0) | 2011.03.16 |
[jsp] 파라미터 한글깨짐현상 (0) | 2011.03.10 |
jquery 폼 전체요소 활성화 컨트롤 (0) | 2011.03.02 |