ISS 웹 서버 연동

쓰리래빗츠 북과 웹 서버를 연동하려면 아파치 톰캣 커넥터를 사용합니다. 쓰리래빗츠 북이 아파치 톰캣을 이용하기 때문입니다.

윈도우 8을 기준으로 설명합니다. 윈도우 버전에 따라 IIS 관리자 화면이 다릅니다.

isapi_redirect.dll 설치

1

설치에 필요한 파일을 받습니다.

IIS와 연동하려면 isapi_redirect.dll를 설치합니다. 설치 파일은 아파치 톰캣 커넥터 페이지에서 받습니다. 1 링크를 이용하여 사용하는 운영체제에 맞는 파일을 받습니다.

아파치 톰캣 커넉터는 1.2.40 버전을 예로 듭니다.

윈도우는 32비트, 64비트에 따라 다른 파일을 받습니다.

64비트일 때 받는 파일

32비트일 때 받는 파일

2

isapi_redirect.dll을 복사합니다.

받은 압축 파일을 풀어서 isapi_redirect.dll을 쓰리래빗츠 북 설치 위치 아래 iss 디렉터리(기본 설치시 C:\3rabbitz\iis)로 복사합니다. iss 디렉터리는 설치 후 별도로 만들어야 합니다.

관리의 편리성을 위하여 iss 연동과 관련된 파일은 쓰리래빗츠 북 설치 위치 아래 iss 디렉터리(기본 설치시 C:\3rabbitz\iis) 에 함께 있도록 합니다.

isapi_redirect.dll 설정

1

isapi_redirect.dll가 위치한 디렉터리에 다음 디렉터리 및 파일을 만듭니다.

isapi_redirect.dll 사용에 필요한 파일 및 디렉터리

예시에 사용된 파일은 여기에서 다운 받습니다. 예시의 내용을 실제 환경에 맞게 수정합니다. 자세한 내용은 공식 사이트 문서를 참고합니다.

2

isapi_redirect.properties 내용을 입력합니다.

# Configuration file for the Jakarta ISAPI Redirector

# The path to the ISAPI Redirector Extension, relative to the website
# This must be in a virtual directory with execute privileges
extension_uri=/3rabbitz/isapi_redirect.dll

# Full path to the log file for the ISAPI Redirector
log_file=C:\3rabbitz\iis\logs\isapi_redirect.%Y-%m-%d.log

# Log level (debug, info, warn, error or trace)
log_level=info

# Rotate the log file every day
log_rotationtime=86400

# Full path to the workers.properties file
worker_file=C:\3rabbitz\iis\workers.properties

# Full path to the uriworkermap.properties file
worker_mount_file=C:\3rabbitz\iis\uriworkermap.properties

extension_uri=/3rabbitz/isapi_redirect.dll 에 사용된 3rabbitz 값은 다음 단계에서 사용됩니다.

3

uriworkermap.properties 내용을 입력합니다.

# Include default
/*=ajp13_worker

# Exclude the static files
!/resource/*=*

!/resource/*=* 설정으로 인하여 static 파일은 ISS 웹 서버가 바로 처리하게 됩니다.

4

workers.properties 내용을 입력합니다.

윈도우에 설치했을 때는 workers.java_home 값에 JDK가 아닌 JRE 경로가 포함되어도 괜찮습니다. 윈도우 시스템 속성의 환경 변수에 있는 JRE_HOME 또는 JAVA_HOME 값을 입력합니다.


#으로 시작하는 문장들은 설정에 영향을 미치지 않는 주석입니다.

# workers.properties -
#
# This file is a simplified version of the workers.properties supplied
# with the upstream sources. The jni inprocess worker (not build in the
# debian package) section and the ajp12 (deprecated) section are removed.
#
# As a general note, the characters $( and ) are used internally to define
# macros. Do not use them in your own configuration!!!
#
# Whenever you see a set of lines such as:
# x=value
# y=$(x)\something
#
# the final value for y will be value\something
#
# Normaly all you will need to do is un-comment and modify the first three
# properties, i.e. workers.tomcat_home, workers.java_home and ps.
# Most of the configuration is derived from these.
#
# When you are done updating workers.tomcat_home, workers.java_home and ps
# you should have 3 workers configured:
#
# - An ajp13 worker that connects to localhost:8009
# - A load balancer worker
#
#

# OPTIONS ( very important for jni mode )

#
# workers.tomcat_home should point to the location where you
# installed tomcat. This is where you have your conf, webapps and lib
# directories.
#
workers.tomcat_home=C:\3rabbitz\tomcat쓰리래빗츠가 설치된 경로 아래의 tomcat 디렉터리를 입력합니다.

#
# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=C:\Program Files\Java\jdk1.7.0_55JDK가 설치된 위치를 입력합니다. JRE를 이용하여 설치한 경우 시스템 속성의 환경 변수에 있는 JRE_HOME 경로를 입력합니다.  

#
# You should configure your environment slash... ps=\ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=\

#
#------ ADVANCED MODE ------------------------------------------------
#---------------------------------------------------------------------
#

#
#------ worker list ------------------------------------------
#---------------------------------------------------------------------
#
#
# The workers that your plugins should create and work with
#
worker.list=ajp13_worker

#
#------ ajp13_worker WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#

#
# Defining a worker named ajp13_worker and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  ----> lbfactor must be > 0
#  ----> Low lbfactor means less work done by the worker.
worker.ajp13_worker.lbfactor=1

#
# Specify the size of the open connection cache.
#worker.ajp13_worker.cachesize

#
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------
#---------------------------------------------------------------------
#

#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
#  ----> If a worker dies, the load balancer will check its state
#        once in a while. Until then all work is redirected to peer
#        workers.
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13_worker

설정 값에 대한 자세한 설명은 아파치 톰캣 커넥트 공식 문서를 참고하세요.

ISS 관리자 설정

isapi_redirect.dll를 IIS에서 사용하기 위해 ISS(인터넷 정보 서비스) 관리자를 이용하여 다음처럼 설정합니다.

1

웹 사이트를 추가합니다.

1사이트 선택 후 마우스 우클릭 메뉴에서 웹 사이트 추가를 선택합니다.

2사이트 이름은 3rabbitz로 입력합니다. 응용 프로그램 풀은 자동으로 만들어집니다.

3실제 경로는 쓰리래빗츠 북 설치 위치 아래 web 디렉터리(기본 설치시 C:\3rabbitz\web) 를 입력합니다.

4호스트 이름은 사용할 서브 도메인 명이 있다면 서브 도메인 명을 포함하여 입력합니다.
웹 서버로 들어오는 모든 서브 도메인을 쓰리래빗츠와 연결하려면 공란으로 남겨둡니다.

한 서버에서 홈페이지와 매뉴얼 페이지를 모두 운영하고자 할때 서브 도메인을 이용합니다. 'www.3rabbitz.com -> 홈페이지', 'doc.3rabbitz.com -> 쓰리래빗츠'와 같이 서비스 하려면 호스트 이름에 'doc.3rabbitz.com'를 입력해야 합니다.

1

가상 디렉터리를 추가합니다.

5웹 사이트 선택하고 마우스 우클릭 메뉴에서 가상 디렉터리 추가 기능을 선택합니다.

6별칭에는 isapi_redirect.properties 파일의 extension_uri=/3rabbitz/isapi_redirect.dll 에서 사용된 3rabbitz를 입력합니다.

7실제 경로는 isapi_redirect.dll 가 위치한 디렉터리를 입력합니다.

별칭과 실제 경로는 isapi_redirect.dll 를 설치, 설정할 때 사용한 값을 이용합니다. 특별한 이유가 없다면 예시와 같이 입력합니다.

2

가상 디렉터리를 선택하고 8처리기 매핑을 더블 클릭합니다.

3

9 ISAPI-dll을 선택하고 10 기능 사용 권한 편집을 선택한 후 11 실행 권한을 부여합니다.

'ISAPI-dll' 항목이 활성화 되지 않은 경우 < 제어판 | 프로그램 | 프로그램 및 기능 | Window 기능 켜기/끄기 > 메뉴를 이용하여 ISAPI 필터, ISAPI 확장 기능을 켭니다.

이 기능을 추가하지 않으면 다음 단계의 'ISAPI 및 CGI 제한' 및 'ISAPI 필터' 설정도 할 수 없습니다.

4

12 좌측 메뉴에서 서버를 선택하고 13 'ISAPI 및 CGI 제한'을 선택합니다.

5

14 추가 버튼을 클릭하여 15 새로운 'ISAPI 및 CGI 제한'을 만듭니다.

ISAPI 또는 CGI 경로는 isapi_redirect.dll를 선택하고 설명은 3rabbitz1를 입력합니다.

6

16 좌측 메뉴의 서버를 선택하고 17 'ISAPI 필터'를 선택합니다.

7

18 추가 버튼을 클릭하여 19 새로운 'ISAPI 필터'를 만듭니다.

필터 이름은 3rabbitz을 실행 파일은 isapi_redirect.dll를 입력합니다.

8

ISS를 재시작 합니다.

서버를 재 시작하면 사이트는 재 시작됩니다. 그러나 응용 프로그램 풀은 별도로 시작하여야 합니다.

톰캣 설정

3RABBITZ_HOME은 쓰리래빗츠 북을 설치한 디렉터리를 지칭합니다.

3RABBITZ_HOME/tomcat/conf/server.xml 파일을 열어서 다음과 같이 내용을 바꿉니다.

<Server port="5791" shutdown="SHUTDOWN">

  <Service name="Catalina">

    <Connector port="8009" protocol="AJP/1.3"
               redirectPort="8443" URIEncoding="UTF-8"  />

    <!--
    <Connector port="1975" protocol="HTTP/1.1"
      connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />
    -->

    <!-- 이하 생략 -->

  </Service>

</Server>

1

AJP/1.3 설정을 위한 Connector의 주석을 풉니다.

work.properties를 설정할 때 8009 포트 번호를 바꿨다면 바뀐 번호를 사용합니다.

2

HTTP/1.1를 위한 Connector를 주석으로 막습니다.

웹 서버를 거치지 않고 1975 포트로 쓰리래빗츠에 접근하는 것도 허용하려면 주석으로 바꾸지 않습니다.

3

쓰리래빗츠를 다시 시작합니다.

변경 사항을 반영하려면 쓰리래빗츠 북를 다시 시작합니다.


  1. 다른 이름을 입력하여도 괜찮습니다.