Change JIRA access URL

Dave Cooper May 13, 2013

Hey there,

At the moment to access my JIRA installation I access <domain>:<port number>. What I would like to do is be able to access JIRA by navigating to jira.<domain> without having to specify the port number. I was just wondering what things need to take place for me to do this.

Thanks in advance!

2 answers

1 accepted

0 votes
Answer accepted
Dave Cooper May 14, 2013

I got this working using JIRA w/apache. I got this working doing the following things:

DNS: On my DNS host I added an A record to point jira.<mydomain> to the IP of the box running my JIRA instance. Please note that DNS records can take a while to propagate so patience is sometimes needed.

Apache: Created a file in /etc/apache2/sites-available called <servername> with the following entry:

<VirtualHost *:80>

ServerName www.<INSERT_DOMAIN_HERE>

ServerAlias <INSERT_DOMAIN_HERE>

ProxyPass / http://localhost:8080/

ProxyPassReverse / http://localhost:8080/

</VirtualHost>

I then ran 'a2ensite <NAME_OF_FILE_YOU_JUST_CREATED>' and reloaded apache2

A note here: Ensure that mod_proxy is enabled - I can't remember if it is enabled by default.

JIRA: I stopped the JIRA service and opened server.xml and added the following two entries to the Connector element:

proxyName="<INSERT_DOMAIN_HERE>"

proxyPort="80"

Then I started the JIRA service.

From here things seemed to work. It seems to me that this is the most basic way to set things up. You have DNS resolving the subdomain to the correct IP, apache sees the request and forwards it on to the JIRA instance.

I'm not a sysadmin, nor do I have vast experience configuring apache, so this might not be what is deemed the "best" way to do this (i.e. the first thing I can see here is that it would be preferable to have this running over https, but that doesn't seem like it would be a lot of effort to get going), so if anyone reading this has any suggestions as to how this can be improved feel free to speak up.

2 votes
Harry Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2013

Hi, refer to https://confluence.atlassian.com/display/JIRA/Changing+JIRA's+TCP+Ports for changing JIRA's port to 80 (or 443 for SSL), so you don't have to specify the port.

To get it to have jira.<domain> add the IP of your JIRA server to your DNS of the domain with jira and this should be good. If you have problems with this port contact your domain registrar.

Dave Cooper May 13, 2013

Hey Harry - thanks for the quick response.

Ideally I would want to run JIRA on a port that isn't 80. From what I am reading now, it should be possible to do with this mod_proxy and setting up a new virtualhost/proxypass.

Will report back if I had any success.

Harry Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2013

Sure, as long as you put a reverse proxy such as Apache or nginx in front. It works fine. Have done it many times.

Bhushan Nagaraj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2013

Hi Harry,

Is this documented somewhere? It will be great if we can have a tutorial/guide on setting this up. Specifically, running JIRA on port 8080 and Crowd or other JIRA apps on different ports but being able to access them with a jira.domain.com

Suggest an answer

Log in or Sign up to answer