apache 설정. Server/WAS



아파치 대박자료!!
정말~~~~ 잘 정리된..
특히 옵션 같은거, 설명 찾기 힘든데.
자세하게 너무 잘 나와있다!!
(정말 감사합니다!! 당신같은 분들 덕분에 초짜 개발자는 희망을 갖고 살아갑니다.ㅋ)

FileCaching

 

 

FileCaching

ON

When set to ON, and the size of the POST data in a request is greater than 2048 bytes, the POST data is first read into a temporary file on disk and then forwarded to the WebLogic Server in chunks of 8192 bytes. This preserves the POST data during failover, allowing all necessary data to be repeated to the secondary if the primary goes down.

Note that when FileCaching is ON, any client that tracks the progress of the POST will see that the transfer has completed even though the data is still being transferred between the WebServer and WebLogic. So, if you want the progress bar displayed by a browser during the upload to reflect when the data is actually available on the WebLogic Server, you might not want to have FileCaching ON.

When set to OFF and the size of the POST data in a request is greater than 2048 bytes, the reading of the POST data is postponed until a WebLogic Server cluster member is identified to serve the request. Then the Plugin reads and immediately sends the POST data to the WebLogic Server in chunks of 8192 bytes.

Note that turning FileCaching OFF limits failover. If the WebLogic Server primary server goes down while processing the request, the POST data already sent to the primary cannot be repeated to the secondary.

Finally, regardless of how FileCaching is set, if the size of the POST data is 2048 bytes or less the plugin will read the data into memory and use it if needed during failover to repeat to the secondary.

 

 

Issues with SSL-Apache Configuration

These known issues arise when you configure the Apache plug-in to use SSL:

  • To prepare the plugin configuration, double click the lock and go to the certificates path:
    • Select the root CA (at the top).
    • Display it.
    • Detail and then copy this certificate to a file using the Coded "Base 64 X509" option.
    • Save the file, for example, to "MyWeblogicCAToTrust.cer" (which is also a PEM file).
  • The PathTrim parameter (see General Parameters for Web Server Plug-Ins) must be configured inside the <Location> tag.

    The following configuration is incorrect:

    <Location /weblogic>
    SetHandler weblogic-handler
    </Location>
    <IfModule mod_weblogic.c>
    WebLogicHost localhost
    WebLogicPort 7001
    PathTrim /weblogic
    </IfModule>

    The following configuration is the correct setup:

    <Location /weblogic>
    SetHandler weblogic-handler
    PathTrim /weblogic
    </Location>
  • The Include directive does not work with Apache SSL. You must configure all parameters directly in the httpd.conf file. Do not use the following configuration when using SSL:
    <IfModule mod_weblogic.c>
    MatchExpression *.jsp
    Include weblogic.conf
    </IfModule>
  • The current implementation of the WebLogic Server Apache Plug-In does not support the use of multiple certificate files with Apache SSL.

 

 

 

 

Apache Plug-in 설정

[httpd.conf Sample]


LoadModule weblogic_module modules/mod_wl_22.so
<IfModule mod_weblogic.c>
  WebLogicHost myweblogic.server.com
  WebLogicPort 7001
  DebugConfigInfo ON

  CookieName JSESSIONID

  KeepAliveEnabled ON

  KeepAliveSecs 20

  DynamicServerList OFF

  Idempotent OFF
  MatchExpression *.jsp

  WLExcludePathOrMimeType "*.gif, *.css, *.js"

#Debug Option 설정

  Debug ALL
  WLLogFile D:\Temp\wlproxy.log

#SSL 연동 설정
  SecureProxy ON
  EnforceBasicConstraints off
  TrustedCAFile D:\temp\test.pem
  RequireSSLHostMatch false
</IfModule>

<Location /weblogic>

 SetHandler weblogic-handler

 PathTrim /weblogic

</Location>

or

 

LoadModule weblogic_module modules/mod_wl_20.so
<IfModule mod_weblogic.c>
WebLogicCluster agarwalp02: 8005, agarwalp02: 8006
Debug ON
WLLogFile c: /tmp/global_proxy.log
WLTempDir "c: /myTemp"
DebugConfigInfo On
KeepAliveEnabled ON
KeepAliveSecs 15
</IfModule>

 

http://webServer/index.jsp?__WebLogicBridgeConfig

 

[Virtual Host 설정]

LoadModule weblogic_module modules/mod_wl_22.so

NameVirtualHost *:80

<VirtualHost *:80>

DocumentRoot C:\Apache\htdocs
ServerName fis.domain.com:80
<IfModule mod_weblogic.c>
  WebLogicHost xxx.xxx.xxx.xx
  WebLogicPort 7003
  MatchExpression *
</IfModule>
</VirtualHost>

<VirtualHost *:80>
ServerName account.domain.com:80
<IfModule mod_weblogic.c>
  WebLogicHost xxx.xxx.xxx.xx
  WebLogicPort 7005
  MatchExpression *
</IfModule>
</VirtualHost>

<VirtualHost *:80>
ServerName pda.domain.com:80
<IfModule mod_weblogic.c>
  WebLogicHost xxx.xxx.xxx.xx

  WebLogicPort 7007
  MatchExpression *
</IfModule>
</VirtualHost>

 

SunOne Plug-in

1. Module Copy

2. magnus.conf 설정 : 파일 제일 밑부분에 추가

Init fn="load-modules" funcs="wl_proxy,wl_init" shlib="libproxy_61.so"
Init fn="wl_init"

3. obj.conf 설정

- mime type 을 이용하는 경우

Service method="(GET|HEAD|POST|PUT)" type=text/jsp fn=wl_proxy WebLogicCluster="192.168.10.11:8001,192.168.10.11:8002" PathPrepend=/

- request 유형별로 설정하는 경우

<Object name="weblogic" ppath="*-weblogic--">
Service fn=wl_proxy WebLogicHost=myserver.com\
 WebLogicPort=7001 PathTrim="/weblogic"
</Object>

4. mime type 을 이용하는 경우, mime.types 파일내에 해당 mime type 설정

type=text/jsp                                    exts=jsp

  • 확장자 .exe파일이 다운로드 해야하는 경우 주석처리 -
    #type=magnus-internal/cgi                         exts=cgi,exe,bat


 Plug-In Options - DynamicServerList 관련

DynamicServerList ="ON" 

새로운 서버나 failed된 서버 또는 복구된 서버등을 파악하여 클러스터 멤버들을 자동으로 update되며, Plug-in은 실행 가능한 모든 서버들(dynamic server list) 사이에서 단순 round-robin을 수행한다. 클러스터링이 아닐 경우 “OFF” 클러스터링일 경우에도 동적인 웹로직 서버 추가가 없다면 “OFF”로 설정을 권장.

 

DynamicServerList ="OFF"

dynamic cluster list disable되며, WeblogicCluster 정의된 서버 리스트에 대해 request틀 load balancing한다.

 

DynamicServerList ="OFF"시 관련된 parameter의 설명과 ConnectRetry횟수 설정방법.

## ProductAgreementEAR  Prod1Domain  (42.1.152.31 ngcore1, 42.1.152.32 ngcore2) Forwarding ##
<Object name="agreement" ppath="--agreement--">
Service fn="wl_proxy" WebLogicCluster="42.1.152.31:9101,42.1.152.31:9102,42.1.152.31:9103,42.1.152.31:9104,42.1.152.32:9101,42.1.152.32:9102,42.1.152.32:9103,42.1.152.32:9104" DynamicServerList="OFF" DebugConfigInfo="OFF" Idempotent="OFF" WLIOTimeoutSecs="50"
</Object>

 

====================================================================

- WLIOTimeoutSecs : 해당 옵션은 한번의 읽기/쓰기 동작에 대한 TimeOut시간을 의미 한다. 일반적인 경우 Server Shutdown 혹은 Hang up 상태인 경우 Bad Marking 하지만, 특정 Application 에서 비정상 적으로 오랜 시간이 걸리는 경우는WLIOTimeoutSecs (or HungServerRecoverSec)을 충분히 늘려주어서 Server가 불필요 하게 Bad Marking 되는 것을 방지해야 한다.

 

- Idempotent : WebLogic서버로 부터 request전송시 에러가 발생하거나, 서버로부터 결과를 기다리는 중에 위에 정의된 WLIOTimeoutSecs 시간이 초과되어서 에러 발생시 요청을 다시 보낼 것인가를 지정.
그러나, 서버와 연결은 되었는데 그 이후에 에러가 발생 하였을 경우 해당 옵션이 ON이면 다시 연결을 시도하고 요청을 보내게 되므로 중복 요청의 가능성이 있다. OFF권장.

 

- DebugConfigInfo : 디폴트 "OFF"이며 "ON"일 경우 run-time시에 plug-in에 구성 정보를 자세하게 볼 수 있다. 구성을 확인하기 위해서는 웹서버로 보내는 요청에 파라미터 "?__WebLogicBridgeConfig" 를 지정 하여 호출 하게 되면 브라우져에서 구성 정보를 확인 할 수 있다. 보안 목적상 운영 환경에서는 OFF를 권장한다.

  (ON일 경우 로그를 남기는 파라메터는 아님.)

 

- DynamicServerList="OFF"시의 ConnectRetry횟수 설정.
* ConnectRetry
 횟수
 = ConnectTimeoutSecs / ConnectRetrySecs
* ConnectTimeoutSecs : timeout
 시간(retry 전체) , default 10

* ConnectRetrySecs   : retry
 시간 최소 2초 이상 , default 2
예제) 위의 설정에 WebLogicCluster의 IP:Port 개수가 8
    8 = ConnectTimeoutSecs(16 secs) / ConnectRetrySecs(2 secs)
    8 = ConnectTimeoutSecs(24 secs) / ConnectRetrySecs(3 secs)

 

[설정 가이드]
-
 기본 가정 : ConnectRetrySecs은 2초로 설정하여 ConnectTimeoutSecs을 계산

 

- OFF시 서비스 중인 managed server로만 설정
<Object name="agreement" ppath="--agreement--">
Service fn="wl_proxy" WebLogicCluster="42.1.152.31:9101,42.1.152.31:9102,42.1.152.31:9103,42.1.152.31:9104,42.1.152.32:9101,42.1.152.32:9102" DynamicServerList="OFF" DebugConfigInfo="ON" Idempotent="OFF" WLIOTimeoutSecs="50" ConnectTimeoutSecs="12" ConnectRetrySecs="2"
</Object>

 

- OFF시 서비스 하지 않는 managed server를 포함하여 설정
<Object name="agreement" ppath="--agreement--">
Service fn="wl_proxy" WebLogicCluster="42.1.152.31:9101,42.1.152.31:9102,42.1.152.31:9103,42.1.152.31:9104,42.1.152.32:9101,42.1.152.32:9102,42.1.152.32:9103,42.1.152.32:9104" DynamicServerList="OFF" DebugConfigInfo="ON" Idempotent="OFF" WLIOTimeoutSecs="50" ConnectTimeoutSecs="16" ConnectRetrySecs="2"
</Object>

 

 


덧글

댓글 입력 영역