페이지 트리
메타 데이터의 끝으로 건너뛰기
메타 데이터의 시작으로 이동

Purpose

This article discusses one option for configuring custom URLs for the JIRA Service Desk customer portal. This will allow you to provide a simple URL that customers can use to access the portal.

  • This solution applies to the Server version of JIRA Service Desk 3.0+
    • This solution will not work in older versions and is not available in JIRA Cloud.

This article is only for accessing the portal using an alternate URL that is simpler than the default portal URL. This article does not seek to change the URLs that appear in the JIRA UI or in notifications. In those cases the Base URL and default Service Desk URLs will be used.

Be aware that these changes are customizations and are not supported by Atlassian.  Support is not able to assist with this making this modification or troubleshooting issues that may arise. For assistance please post to Atlassian Answers.

Steps for Configuring Alternate URLs

This method uses the Rerwrite Valve that was introduced in Tomcat 8.

  • Tomcat 8 is the application server included in JIRA 7.0+ and JIRA Service Desk 3.0+. Older versions used Tomcat 7 so this solution will not work prior to JIRA 7.0 and Service Desk 3.0.

Step 1: Configure Rewrite Valve

First you will need to tell Tomcat that it should use the Rewrite Valve. The simplest way is to do the following:

  1. Edit  JIRA_INSTALL/conf/context.xml
  2. Add the following line to this file. Place this above the line containing </Context> 

     

    <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
     여기를 클릭하여 펼치기...

    <?xml version='1.0' encoding='utf-8'?>
    <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements. See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    -->
    <!-- The contents of this file will be loaded for each web application -->
    <Context>

    <!-- Default set of monitored resources. If one of these changes, the -->
    <!-- web application will be reloaded. -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
    on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

    <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />

    </Context>

    Be sure to save the file after making the change. This change will take effect after JIRA is restarted.

    • Before restarting JIRA, proceed to step 2 and configure your rewrite rules

     

Step 2: Create Rewrite Configuration File

Rewrite rules are configured in a rewrite.config file that you will need to create. This file is placed in the JIRA_INSTALL/atlassian-jira/WEB-INF directory.

  1. Create a file named rewrite.config and place it in the JIRA_INSTALL/atlassian-jira/WEB-INF directory.
    1. The final path should be JIRA_INSTALL/atlassian-jira/WEB-INF/rewrite.config
    2. The user that JIRA runs as must be able to read this file. This file should have the same permissions as the other files in WEB-INF directory.

Step 3: Add Rewrite Rules

The rewrite.config file is where you define the rewrite conditions and rules. RewriteCond and RewriteRule are discussed in the Tomcat Rewrite Valve Documentation.

Atlassian Support is not able to assist with configuring or troubleshooting rewrite rules. For assistance please post to Atlassian Answers.

Redirecting Subdomain to Customer Portal

The following example will redirect requests sent to "support.domain.com" to the customer portal located at "jira.domain.com

RewriteCond %{HTTP_HOST} ^support\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://jira.domain.com/servicedesk/customer/portals [R=301,L]

 

Redirecting Multiple Subdomains to Customer Portal

The following example will redirect requests sent to "subdomain1.domain.com" and "subdomain2.domain.com" to the customer portal located at "jira.domain.com

RewriteCond %{HTTP_HOST} ^(subdomain1|subdomain2)\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://jira.domain.com/servicedesk/customer/portals [R=301,L]

 

Redirecting Subdomain to Specific Service Desk Portal

The following example will redirect requests sent to "desktopsupport.domain.com" to the desktop support customer portal which is located on "jira.domain.com" and has ID "2" 

RewriteCond %{HTTP_HOST} ^desktopsupport\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://jira.domain.com/servicedesk/customer/portal/2 [R=301,L]

 

Redirecting Subdomain to Specific Request Type Form

The following example will redirect requests sent to "helprequest.domain.com" to the request type form with ID "4" which is located in the service desk portal with ID "2" 

RewriteCond %{HTTP_HOST} ^helprequest\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://jira.domain.com/servicedesk/customer/portal/2/create/4 [R=301,L]

 

Alternate Methods

This is only one method of configuring an alternate URL. Other methods include the use of a proxy server, such as Apache or Nginx, to rewrite the URLs.

  • 레이블 없음