Important Notice : This article applies only for Atlassian products on the "Server" and "Data Center" platforms. For Cloud, please refer to the following suggestion.
Purpose
This article presents a simple solution based on NGINX as a reverse-proxy in front of Jira Service Desk in order to customize the portal URL. As a result, it will be possible to access Jira Service Desk Portal from a URL like this one for example : http://support.mycompany.com and access Jira Service Desk back-end from : http://support.mycompany.com/jira.
Customizing the portal URL is one of the common requests every Jira Service Desk Administrator receives from end-users because the standard portal URL is a bit difficult to remember.
This is a workaround for a JSD-315. Other workarounds exist and can be found here :
For a number of Jira admins, these workarounds are time consuming, especially when you need to implement them in all your environments. The solution suggested in this article is by far simpler and can be implemented in few minutes, especially if you are using a reverse-proxy like NGINX (some adaptations are necessary if you are using HA-Proxy or Apache).
Before describing the solution, it is worth noting that :
Solution :
Prerequisite :
server {
listen 80;
server_name support.mycompany.com;
location /jira {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass "http://my-jira-server-name:8080/jira";
access_log /var/log/nginx/jira-http-access.log;
error_log /var/log/nginx/jira-http-error.log;
}
}
Steps :
Add a simple proxypass rule as follows in NGINX configuraiton file :
server {
listen 80;
server_name support.mycompany.com;
location = / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass "http://my-jira-server-name:8080/jira/servicedesk/customer";
}
}
location /jira {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass "http://my-jira-server-name:8080/jira";
}
}
It is worth noting that if you are using an add-on, the redirection rule must be adapted depending on your plugin.
Also, it is very important to emphase the use of "=" in the location because if it is not used (or forgotten), you may encounter a lot of trouble.
Happy redirecting ... !
M Amine
Cloud Architect
Digital Innovation
Morocco
30 accepted answers
0 comments