본문 바로가기
728x90
반응형
  • 개요
  • obj.conf 파일은 HTTP request Processing 하기 위한 파일이다.
  • 위치는 {instance디렉토리}/config 아래 위치한다.
  • obj.conf 웹서버 생성시 동시에 생기며, 가상서버를 새로 만든다면 가상서버이름-obj.conf 파일이 새로생긴다.
    • 이 가상서버 conf 는 server.xml 에 등록되므로 확인

 

  • Request-Handling Process
  • 프로세서 진행순서는 다음과 같다.
  1. AuthTrans - 인증정보를 확인(ID/PW )
  2. NameTrans - URI 로컬 파일시스템 경로로 변환
  3. PathCheck - 로컬파일시스템의 유효성 체크 요청자의 접근권한 확인
  4. ObjectType - 요청된 자료의 MIME 타입 확인 리소스 설정 지정
  5. Input - 서비스 단계 에서 읽은 요청에 적용할 필터 선택
  6. Output - 서비스 단계에서 생성된 응답 데이터에 적용할 필터 선택
  7. Route - 서비스를 제공할 서버 선택
  8. Service 클라이언트에게 보낼 응답 생성 전송
  9. AddLog - 로그 추가
  10. Error - 클라이언트에게 에러메시지 전송 프로세스 종료, 이전단계에서 에러가 있을 때만 발생

 

  • Obj.conf 지시문(SAF, Server Application Functions)

 

<Object name="default">
AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
#NameTrans fn="ntrans-j2ee" name="j2ee"
NameTrans fn="pfx2dir" from="/mc-icons" dir="/sw/iPlanet/lib/icons" name="es-internal"
PathCheck fn="uri-clean"
PathCheck fn="check-acl" acl="default"
PathCheck fn="find-pathinfo"
#PathCheck fn="find-index-j2ee"
PathCheck fn="find-index" index-names="index.html,home.html,index.jsp"
#ObjectType fn="type-j2ee"
ObjectType fn="type-by-extension"
ObjectType fn="force-type" type="text/plain"
Service method="(GET|HEAD|POST|PUT)" type="text/jsp" fn="wl_proxy" WebLogicCluster="192.168.100.10:17205,192.168.100.10;17203"
Service method="(GET|HEAD)" type="magnus-internal/directory" fn="index-common"
Service method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file"
Service method="TRACE" fn="service-trace"
#Error fn="error-j2ee"
AddLog fn="flex-log"
</Object>

 

여기서 fn 다음에 오는 " " 해당 SAF 이름이며 앞의 AuthTrans, Service 등은 위에서 살펴본 값들이다.

위와같이 기본값으로 제공되므로, 위를 수정하거나 새로운 SAF 만들수도 있다.

( 몇몇 값들은 내가 수정한것이다. 주석처리와 wl_proxy)

기본적으로 magnus.conf 파일에 NASPI 플러그인으로 초기화되는 기본 SAF 들이 들어있으니 확인해보면 좋다.

 

 


 Object 형식

  • obejct 들은 name이나 ppath 가 포함될 수 있다.
    •   <Object name="default"> 또는<Object ppath="*/web/*">  둘다 포함될 수 있음

 

  • iPlanet 서버는 항상 deafult 개체의 지시문으로 시작(main 함수처럼)
    • NameTrans 지시문에 이름인수가 있거나, NameTrans 단계에서 ppath 경로가 일치하는 경우 프로세스 진행이 default object 에서 바로 다른 object 로 switch 될 수 있음
    • 예를 들면 기본객체가 다음과 같고
      <Object name="default">
      NameTrans fn="pfs2dir" from="/cgi" dir="D:/oracle/webserver7/https-server/docs/mycgi" name="cgi"
      …
      </Object>​
      request URL 이 http://SERVER_NAME/cgi 일때, NameTrans 단계가 진행될때 서버는 cgi 이름을 가진 object 에서 지시문을 수행한다.
      <Object name="cgi">
      …
      </Object>​
    •  SAF 항목의 default 를 예시로 들면, ~~/mc-icons 로 요청이 들어왔을 때, name 값인 es-internal의 Object로 넘기게됨
  • NameTrans 과정이 끝나고 URL 들이 다 변환되면 다음단계로 진행
    • 변환된 경로가 obj.conf 내의 다른 Object 의 ppath 값과 일치할 경우, 남은 지시문은 수행하지않고 바로 그 Object 로 넘어가서 진행한다.
    • 예를들어 기본객체가 다음과 같으면,
      <Object name="default">
      NameTrans fn="document-root" root="D:/oracle/webserver7/http-server/docs"
      …
      </Object>​
      요청된 URL 이 http://SERVER_NAME/testinternaltest.html 처럼 변환되면 다음 ppath의 obejct 를 수행
      <Object ppath="*internel*">
      …
      </Object>​

(아스타 처리를 통해 매칭이 가능하다)

 

 

 

참고

https://docs.oracle.com/cd/E19146-01/821-1827/abvag/index.html

 

 

728x90
반응형

한걸음 한걸음

개인적인 기록