JIRA とIIS との統合
このページの内容は、JIRA でサポートされていないプラットフォームに関連しています。したがって、アトラシアンは、そのためのサポートの提供を保証できません 。この資料は情報提供のみを目的としているため、お客様自身の責任でご使用ください。
このページでは、ユーザーからのリクエストをマイクロソフトの IIS ウェブサーバーが JIRA に引き渡し、またそれに対する応答を IIS がユーザーに返すように、IIS および JIRA を設定する方法について説明します。この説明は、お客様において既にウェブページ (例えば、http://mycompany.com) を提供する IIS が稼働中であり、かつ JIRA を少しだけ異なる URL (例えば、http://mycompany.com/jira) に統合する場合に有用です。
JIRA は Java で記述されており、その実行には Java アプリケーションサーバー (サーブレットコンテナー) が必要です。IIS はJava アプリケーションサーバーとしての機能を提供していないため、JIRA を IIS に直接デプロイすることはできません。ただし、JIRA がデプロイされているアプリケーションサーバーのプロキシとして JIRA にリクエストを引き渡すように IIS を設定することは可能です。従って、お客様の主ウェブサイトが IIS 上で稼動している場合に JIRA をそのウェブサイトと統合することが可能になるのです。
JIRA をIIS と統合する際には、IIS との統合機能を提供しているJava アプリケーションサーバー (例えば Apache Tomcat) に JIRA をデプロイする必要があります。
JIRA がApache Tomcat 以外のアプリケーションサーバー上で稼動している場合、アプリケーションサーバーの IIS への統合の可否 (ならびにその方法) についてはそのアプリケーションサーバーの説明書を参照してください。
JIRA を IIS に統合する手順は以下の通りです :
- JIRA の設定と動作テスト
- IIS からのプロキシを介したリクエストを受け入れるための Tomcat の設定
- JIRA リクエストを Tomcat に転送するための IIS の設定
- (Optional) Configure IIS to forward Confluence requests to Tomcat (if you are using both Confluence and JIRA).
1. JIRA の設定
- Follow the JIRA installation guide to install and configure JIRA; or deploy the WAR distribution into Apache Tomcat. Note that JIRA can be installed on the same machine as IIS, but this is not necessary.
Change the context path of the JIRA web application:
To allow IIS to proxy requests to JIRA, JIRA web application must be deployed with a context path (e.g. the /jira in http://localhost:8080/jira (http://localhost:8080*/jira*)) in Tomcat. The context path must be set to the path in the URL that IIS will use to proxy requests. For example, if your website is running with addresswww.example.com
in IIS, and you would like to make JIRA available underwww.example.com/jira
, you will need to set JIRA's context path to "/jira
" in Tomcat.
To do this, edit theconf/server.xml
file (or thejira.xml
file if you are using the WAR distribution of JIRA). Change thepath
attribute of theContext
element to "/jira
".- コンテキストパス修正後、JIRA を再起動します。 コンテキストパスを含むように
- Set the 'Base URL' to include the context path (see Configuring JIRA Options).
- Turn JIRA's GZip compression OFF (since there will be no benefit from GZip compression once proxying is implemented).
- ウェブブラウザーにおいて Tomcat を直接ポイントし (例えば http://localhost:8080/jira)、JIRA セットアップウィザードを最後まで実行して JIRA が正しく動作することを確認するテストを行います。以前にセットアップウィザードを実行済みの場合は、課題の作成や編集を代わりのテストとします。エラーが全く起こらないことを確認してください。
2. プロキシされたリクエストを受け入れるための Tomcat の設定
HTTP/1.1 Connector
HTTP/1.1 Connector を使用している場合、Tomcat の server.xml
に次の属性を追加する必要があります:
proxyName="mycompany.com" proxyPort="80"
参考として Integrating JIRA with Apache をご覧ください。
Enable AJP/1.3 Connector in Tomcat: To allow Tomcat to accept requests for JIRA from IIS, edit the
conf/server.xml
file and ensure that the AJP/1.3 Connector is enabled (i.e. not commented out). To enable the AJP/1.3 Connector in a JIRA remove the comment symbols around the following section in theconf/server.xml
file:<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
The above example configures Tomcat to listen for proxied IIS requests on port
8009
. If this port is already in use on the machine where JIRA is running, please change to another port.- Tomcat を再起動し、使用したポートに関連するエラーがログにもコンソールの表示にも現れないことを確認してください。
- AJP Connector が指定したポート (デフォルトでは 8009) でリッスンしていることを確認します。これを行う方法の 1 つとして、コマンド ウィンドウで "
netstat -na
" コマンドを使用して、ポート 8009 が出力の一覧に表示されるかどうかを確認できます:
3. JIRA にリクエストを送るための IIS の設定
IIS がデプロイされているマシーンにおいて、次の手順を実行します :
Apache のサイトから ISAPI Redirect DLL をダウンロードします。ダウンロードの際には、IIS が実行されている Windows のバージョン (Win32 または Win64) を選択し、次に利用可能な jk の中の最新バージョンを選択します。
ダウンロードするファイルの名称は isapi_redirect_X.X.X.dll となっており、ここで 'X.X.X' はバージョン番号です。このバージョン番号は DLL ファイル名から除去する必要があります (即ち、ファイル名を isapi_redirect.dll としなければなりません)。
- Place the DLL and the associated properties files in an installation directory. For the purpose of this document, we will assume the directory is
C:\tomcat_iis_connector
. Place the isapi_redirect.dll in this directory. Then download the isapi_redirect.properties file and place this in the same directory as the isapi_redirect.dll file. - Create a directory called 'conf' in your installation directory (
C:\tomcat_iis_connector\conf
). Download the files uriworkermap.properties and workers.properties.minimal and place them in theC:\tomcat_iis_connector\conf
directory. - "logs" という名前のディレクトリを作成します (
C:\tomcat_iis_connector\logs
)。このディレクトリに、isapi_redirect.dllの実行に伴うログが保存されます。 - "
C:\tomcat_iis_connector
" ディレクトリではisapi_redirect.properties
ファイルを変更する必要がある場合があります。このisapi_redirect.properties
ファイルはコネクターに対し、その設定ファイルの保存場所の情報と IIS サーバーに関係する DLL の保存場所の情報を伝えます。このファイルには次の 5 つのプロパティが記述されています。- extension_uri — isapi_redirect.dll が保存されている仮想ディレクトリのパスです
- log_file — ログファイルに書き込みを行うときのパスです
- log_level — ログを生成する際のログレベルです
- worker_file — 現在のインストレーションにおける
workers.properties.minimal
ファイルのパス - worker_mount_file — the path to your
uriworkermap.propertiesl
file in your installation.
If you are installing the connector inC:\tomcat_iis_connector
and you follow the instructions below about setting up the virtual directory for the isapi_redirect.dll, then you should not have to change any properties in the provided file.
"
C:\tomcat_iis_connector\conf
" ディレクトリではuriworkermap.properties
およびworkers.properties.minimal
ファイルを変更する必要がある場合があります。これらのファイルは、ここで説明した設定変更内容を記録しており、このドキュメントに従って最後まで作業した場合はそのままで正しく動作します。このドキュメントとは異なる作業を行った場合、以下の手順でこれらのファイルを書き換える必要が生じます。
workers.properties.minimal
ファイルは、Tomcat が実行されている場所 (IP アドレスとポート番号) を IIS に伝えます。uriworkermap.properties
ファイルは、IIS に対し、どのリクエストを Tomcat に対してプロキシするかを伝えます。
これらのファイルは以下の手順で編集します。Edit the
uriworkermap.properties
and ensure that it contains the following mapping for JIRA. You do not need any other mappings./jira/*=worker1
The mapping (e.g.
/jira/
) *must be the same as the context path that JIRA has been deployed with in Tomcat as described in the Configure JIRA section of this document.- Edit the
workers.properties.minimal
file and modify theworker.ajp13w.host
property if necessary. This property should be set to the host name or the IP address of the machine where Tomcat (with JIRA) is running. If Tomcat is running on the same machine as IIS then you can leave the property set tolocalhost
. If you have specified a host name as the value of this property, please ensure that the IIS machine can correctly resolve it to the appropriate IP address. AJP Connector のポートを変更している場合は、
worker.ajp13w.port
プロパティの修正も必要です。以下に、Tomcat が IIS と同一のマシン上で実行されていて、AJP について既定のポート (8009) を使用している場合の、このファイルの例を示します。worker.list=worker1 # # Defining a worker named worker1 and of type ajp13. # Note that the name and the type do not have to match. # worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009
- Control Panel、続いて Administrative Tools を開き、さらに Internet Information Services. を開きます。
- IIS 7.0 の場合のみ : IIS 7.0 を使用している場合は、次の手順で必要なサービスロールである ISAPI Extensions および ISAPI Filtersをインストールしなければなりません :
- Start Menu > All Programs > Administration Tools > Service Manager と移動します。
- Server Manager > Roles から 'Web Server (IIS)' を選択します。
- 'Add Role Services' をクリックし、以降はウィザードに従って操作します。
- 以下の手順で IIS に ISAPI Filter を追加します :
- IIS 6.0 以前の場合 :
- Default Web Site (または JIRA へのリクエストに対してプロキシの役割を持たせるウェブサイト) 上で右クリックし、Properties をクリックします。
- ISAPI Filters タブをクリックします。
isapi_redirect.dll
ファイルをポイントするフィルターが存在すること、およびそれが適切な場所にあることを確認します。存在しない場合は、[Add] をクリックしてそれを作成します。フィルター名として「tomcat
」と入力し、実行ファイルとしてisapi_redirect.dll
の場所を指定します。- Apply、続いて OK をクリックします。
- IIS 7.0 の場合 :
- Default Web Site (または JIRA へのリクエストに対してプロキシの役割を持たせるウェブサイト) 上で右クリックし、ISAPI Filters をクリックします。
- ISAPI Filters のアイコンをクリックします。
isapi_redirect.dll
ファイルをポイントするフィルターが存在すること、およびそれが適切な場所にあることを確認します。存在しない場合は、[Add] をクリックしてそれを作成します。フィルター名として「tomcat
」と入力し、isapi_redirect.dll
ファイルの場所を入力します。- [OK] をクリックします。
- IIS 6.0 以前の場合 :
- IIS における JIRA の仮想ディレクトリを作成します。
- Default Web Site (または JIRA へのリクエストに対してプロキシの役割を持たせるウェブサイト) 上で右クリックし、New を選択、続いて Virtual Directory を選択します。
- Go through the creation wizard. Set the
alias
as the value of the Context Path (without slashes) that was set in the Configure JIRA section of this document (see above). In our example this isjira
. - この仮想ディレクトリは任意のディレクトリをポイントすることが可能です。
ウィザードを完了します。
The reason for creating a virtual directory is so that requests without the trailing slash still work. For example, if you are deploying JIRA under
http://www.example.com/jira/
without the virtual directory, then requests tohttp://www.example.com/jira
will fail.
- 次の手順に従って、IIS 内の isapi_redirect.dll にアクセスするための仮想ディレクトリを作成します :
- IIS 6.0 以前の場合 :
- Default Web Site (または JIRA へのリクエストに対してプロキシの役割を持たせるウェブサイト) 上で右クリックし、New を選択、続いて Virtual Directory を選択します。
- 作成ウィザードに従って操作します。
alias
はjakarta
に設定します。 - これは isapi_redirect.dll がインストールされているディレクトリをポイントしている必要があります。本ドキュメントの例では
C:\tomcat_iis_connector
です。 - 'Execute' チェックボックスにチェックが入っていて Virtual Directory に対して 'Execute' パーミッションが付与されていることを確認してからウィザードを完了します。
- IIS 7.0 の場合 :
- Default Web Site (または JIRA へのリクエストに対してプロキシの役割を持たせるウェブサイト) 上で右クリックし、Add Virtual Directory を選択します。
alias
をjakarta
に設定します。- Physical Path は isapi_redirect.dll がインストールされているディレクトリをポイントしている必要があります。本ドキュメントの例では
C:\tomcat_iis_connector
です。 - 'jakarta' 仮想ディレクトリをクリックし、'Handler Mappings' をダブルクリックします。
- 右側の Action パネルにある 'Edit Feature Permissions' をクリックします。
'Execute' パーミッションチェックボックスにチェックを入れます。
この仮想ディレクトリはコネクターを動作させるために必要です。ディレクトリに設定したエイリアスは、
isapi_redirect.properties
ファイルのextension_uri
プロパティに記述されているパスと同一である必要があります。本ドキュメントの例では/jakarta/isapi_redirect.dll
です。
- IIS 6.0 以前の場合 :
- IIS 6.0 または 7.0 を利用している場合、以下の手順に従って Web Service Extension として DLL を追加する必要があります。
- IIS 6.0 の場合 :
- Web Service Extensions 上で右クリックし、Add a new Web Service Extension... を選択します。
- [Extension Name] に「
tomcat
」と入力し、必要な指定ファイルにisapi_redirect.dll
ファイルを追加します。 - Set extension status to Allowedチェックボックスにチェックを入れ、OK をクリックします。
- IIS 7.0 の場合 :
- サーバー群の中から該当のサーバーをハイライトします。
- 'ISAPI and CGI Restrictions' に移動します。
- isapi_redirect.dll 拡張を追加し、有効化します。
- IIS 6.0 の場合 :
- ここで IIS Service を再起動する必要があります。これを行うには、Control Panel を開き、Administrative Tools をクリックし、さらに Services をクリックし、IIS Admin Service を探して restart をクリックします。
- You are done! To test the configuration, point your web browser at IIS and append JIRA's context path to the URL. For example, if your website is running under the address of
http://www.example.com
and you have deployed JIRA with the context path ofjira
, point your browser athttp://www.example.com/jira
.
4. JIRA に加えて Confluence に対してもリクエストを送る場合の IIS の設定
JIRA と Confluence の両方にリクエストを送ることができるように IIS を設定することも可能です。
以下に、別々の Tomcat サーバー上で実行されている JIRA および Confluence の別々のインスタンスに対して IIS からリクエストを送る方法を説明します。この説明では、IIS からJIRA にリクエストを送るための IIS の設定は上記セクション 3 に従って完了しているものとします。また、Confluence は 「Confluence インストール ガイド 」 に従ってインストール済みであるとします。
The instructions describe how to make JIRA available under www.example.com/jira
as described above, and Confluence available under www.example.com/confluence
.
- JIRA と Confluence を同一のマシーン上で実行している場合、Confluence がリッスンしているポートは JIRA がリッスンしているポートとは異なるポートに設定しなければなりません :
- Edit the
conf/server.xml
file (or thejira.xml
file if you are using the WAR/EAR distribution of Confluence). - At the top of the file, change the
port
attribute of theServer
element to a different port to the value for JIRA. For example, change it from8005
to8006
. - Still in the
Server
element, Change theport
attribute of theConnector
sub-element to a different port to the value for JIRA. For example, change it from8080
to8090
.
- Edit the
- Confluence のコンテキストパスを変更します :
- Edit the
conf/server.xml
file (or thejira.xml
file if you are using the WAR/EAR distribution of Confluence). - Change the
path
attribute of theContext
element to "/confluence
".
- Edit the
- ポートとコンテキストパスの変更後 Confluence を再起動し、ブラウザーで http://localhost:8090/confluence を開いてテストを行い、Confluence が正常に機能していることを確認してください。
- Configure Confluence to accept proxied requests: Remove the comments around the AJP/1.3 Connector section in the Confluence
conf/server.xml
orjira.xml
file and change theport
attribute to a value different to the value for JIRA. For example, change it from8009
to8010
. - Confluence を再起動し、使用したポートに関連するエラーがログにも Tomcat のコンソールの表示にも現れないことを確認してください。
Edit the
uriworkermap.properties
file and add the following mapping:/confluence/*=worker2
結果としてこのファイルにおけるマッピングの記述は次のようになります :
/jira/*=worker1 /confluence/*=worker2
Edit the
workers.properties.minimal
file:
Change the line starting withworker.list
to the following:worker.list=worker1,worker2
Add the following lines to the end of the file (assuming the host is on the same machine as IIS and you changed the AJP/1.3 Connector port for Confluence to
8010
):worker.worker2.type=ajp13 worker.worker2.host=localhost worker.worker2.port=8010
The
workers.properties.minimal
file should now look like the following:worker.list=worker1,worker2 # # Defining a worker named worker1 and of type ajp13. # Note that the name and the type do not have to match. # worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker2.type=ajp13 worker.worker2.host=localhost worker.worker2.port=8010
- Create a virtual directory for Confluence in IIS. Set the
alias
toconfluence
. It can point to any directory. - IIS Service を再起動します。
- You are done! Confluence should now be available under
www.example.com/confluence
, and JIRA should still be available underwww.example.com/jira
.
トラブルシューティング
- Whenever I go to JIRA in my browser, a login panel pops up. I enter a valid username and password for JIRA, but the panel pops up again.Make sure that you have Anonymous Access set on the
jira
virtual directory in IIS. It will be set to that if you have followed the above instructions.To check this:- "Internet Information Services" 内の
jira
仮想ディレクトリを右クリックし、[プロパティ] を選択します。 - 'Directory Security' タブをクリックします。
- 'Anonymous access and authentication control' セクションの 'Edit...' ボタンをクリックします。
- 'Anonymous access' のチェックボックスがチェックされていることを確認し、さらに 'Authenticated access' セクションのその他の項目が有効になっていないことを確認します。'Basic authentication'. を選択してはいけません。また、'Integrated Windows authentication' を選択してもいけません。
- "Internet Information Services" 内の
- Internet Explorer を使用して JIRA にアクセスするたびにログインパネルが現れます。正しいユーザー名とパスワードを入力するのですが、それでもパネルが必ず現れます。ただし、 Firefox や Safari なと、別のブラウザーを使用するとこの現象は起きません。これらのブラウザーを使用した場合、JIRA に正常にログインすることができます。Internet Explorer の ユーザー認証が匿名でログオンするに設定されていることを確認してください。これは次の手順で確認することができます :
- Internet Explorer の 「ツール」メニューをクリックし、「インターネットオプション」を選択します。
- 「セキュリティ」タブをクリックします。
- JIRA サーバーが該当するセキュリティゾーンを選択します。
- 「レベルのカスタマイス...」ボタンをクリックします。
- 右側のバーをスクロールして一番下の「ユーザー認証」セクションを表示します。
- 「匿名でログオンする」を選択します (選択されていない場合)。
- この画面と次の画面の 'OK' ボタンをクリックします。
- Internet Explorer を再起動します。
- ブラウザーの http://localhost/jira でJIRA インスタンスのナビゲートを試したところ、 無意味な情報ファイルのダウンロードの指示が出ました。IIS では、JIRA の仮想ディレクトリで「実行」許可を取得しておいて下さい。詳細については、本ドキュメントの「3. IIS を設定して、 JIRA にリクエストを送信する」セクションのステップ11 をご参照下さい
既知の問題
- 64 bit IIS:OS が 64 bit の場合は、Tomcat IIS コネクターの 64 bit バージョンを使用してください。
- お客様からのソリューション情報: 32 bit のIIS コネクタのみ利用可能な場合、
Application Pools > Advanced Settings > Allow 32bit applications
をクリックして利用できます。 - お客様からのソリューション情報 : ウェブサイトの ISAPI 拡張を設定する必要があります。