connect JIRA to domain name

Saneth Kumar
Contributor
November 16, 2011

Hi,

I currently use JIRA over an IP Address. I would like to configure it so I can use it over my domain name http://jira.example.com . I went through the documentation (http://confluence.atlassian.com/display/JIRA044/Integrating+JIRA+with+Apache), but couldn't find anything that could help me. I'm using JIRA 4.4.3 on a Windows Server 2003 SP2.

Regards,

Saneth

3 answers

1 accepted

3 votes
Answer accepted
Thomas Wendel
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.
November 16, 2011

Saneth,

Is JIRA the only application running on that server? Or more specific: is it the only application that you would want to listen on port 80 so it can be reached through http://jira.example.com ?

If yes you can:
- Set up a DNS A-record that points jira.example.com to the IP address of your server.
- Modify the file server.xml so the embeded JIRA Tomcat listens on port 80:
Find the following code in server.xml...

<Connector port="8080"
	maxThreads="150"
	minSpareThreads="25"
	maxSpareThreads="75"
	connectionTimeout="20000"
	enableLookups="false"
	maxHttpHeaderSize="8192"
	protocol="HTTP/1.1"
	useBodyEncodingForURI="true"
	redirectPort="8443"
	acceptCount="100"
	disableUploadTimeout="true"/>

...change the connector port to 80...

<Connector port="80"
	maxThreads="150"
	minSpareThreads="25"
	maxSpareThreads="75"
	connectionTimeout="20000"
	enableLookups="false"
	maxHttpHeaderSize="8192"
	protocol="HTTP/1.1"
	useBodyEncodingForURI="true"
	redirectPort="8443"
	acceptCount="100"
	disableUploadTimeout="true"/>

...and restart JIRA.

Please keep in mind that it takes a while for DNS changes to become active.
And don't forget to change the base URL in the JIRA administration.

Cheers,
Thomas

Mizan
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.
September 11, 2012

Hi Thomas ,

Can i have Jira and Confluence on the same machine using port 80 ? for example jira.example.com and confluence.example.com ..

I have to integrate both .

Thank you.

Nic Brough -Adaptavist-
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.
September 11, 2012

Yes, that's what Apache virtual machines do - present two urls on whatever port you want.

Mizan
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.
September 12, 2012

Hi Nic ,

We dont have Apache , its only the Tomcat which comes with a standalone installation .. will i need Apache ?

Thanx .

Thomas Wendel
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.
September 12, 2012

Hi Mizan,

Nic is right. You need a web server if you want to run the two applications on the same port.
Atlassian has a pretty good documentation about how to configure Apache.
In terms of tuning Confluence and JIRA for a high load, it is recommended to use a web server as well.

Cheers,
Thomas

Nic Brough -Adaptavist-
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.
September 12, 2012

Yup, you'll need Apache or something. What I usually set up is set up something like:

  1. Tomcat 1: Jira on connector port 8999
  2. Tomcat 2: Confluence on connector port 9999
  3. Apache vhost 1: Jira.somewhere.com, proxying to port 8999
  4. Apache vhost 2: Confluence.somewhere.com, proxying to port 9999

The port numbers don't really matter, as long as they don't clash with anything (also, keep it simple - don't use a connector port below 1024). Remember to set your base urls in the application to the proxied addresses, and it'll all look fine.

Mizan
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.
September 14, 2012

Hi Thomas ,

I modified the server.xml of Jira the way you showed above however it gives an error in log and Jira is not accessible . log says the address already in use.

Do you know what went wrong ?

Thanx

Nic Brough -Adaptavist-
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.
September 14, 2012

So you're running something else on that port already. Did your previous installation shut down ok ? What else have you configured to run on the server?

Remember that if you're trying to run two web services (e.g. a Jira and a Confluence) on one server, you still need to run them on separate ports, and use a web-server front end (like Apache, as discussed) to route incoming requests to the right port if you don't want to specify the port on the urls in use.

The command "netstat" should tell you what programs are holding which ports open.

Mizan
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.
September 16, 2012

Hi Nic ,

netstat says no program using port 80 .

Jira and Confluence on separate tomcat .

But there can be a possibility that previous installation did not shut down correctly ,though the process was not running there was a message saying "Unable to remove catalina.pid" .

Can this be a reason ? how to tackle this ?

Thank you.

Thomas Wendel
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.
September 16, 2012
Mizan,
You said:
I modified the server.xml of Jira the way you showed above however it gives an error in log and Jira is not accessible . log says the address already in use.

Keep in mind that the changes to server.xml I described above apply only when you want to run JIRA on port 80 without an Apache webserver in front of it! (as this was a possible answer to the question of the OP)

Your JIRA most likely does not start now because the Apache webserver you installed is already listening on port 80.

Your JIRA and Confleunce server.xml files have to be configured differently in order to work behind a webserver. Please read up on the following Atlassian documentation:


Mizan
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.
September 16, 2012

Hi Thomas ,

You are right , I found the port 80 being listened by a process called httpd . I was not aware of the apache server . There was proxy setting as below in the httpd.conf file

ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/

so just uncommented below lines in the server.xml

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

and now Jira is running on port 80 .

Once again thanks alot for your help.

1 vote
Fahad V A
Contributor
January 14, 2014

Hi Thomas,

I am currently accessing JIRA from Ip address, I mapped a DNS jira.intra.xyz.comto the Ip address to acces JIRA from jira.intra.xyz.co, edited the base URL and editing server.xml to Connector port="80"

After this I am not able to access JIRA from both IP address and DNS, When I undo the server.xml and kept the base url as jira.intra.xyz.com, then I am able to access through Ip address.

What have I done wrong, how to access JIRA through DNS?

Thomas Wendel
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.
January 14, 2014

Hello Coriant,

After you made the changes to the server.xml file you couldn't reach JIRA neither throught the IP address nor the URL http://jira.intra.xyz.com?

Are you sure the domain name jira.intra.xyz.comis pointing to the right IP address? Can you ping your server using that domain name?

Is there anything else running on port 80 on this server? You would notice this in the log file. JIRA wouldn't start and an error message would be in the log.

Cheers,
Thomas

seanjmc September 3, 2017

Hi,

I changed my port to 80 as suggested and rebooted the server.  When I tried to log back in nothing happened.

 

I cahnged server.xml back to 8080 and tried again.  I started jira manually as follows :

jira@jira:/opt/atlassian/jira/bin$ sudo ./start-jira.sh

To run JIRA in the foreground, start the server with start-jira.sh -fg
executing using dedicated user: jira2
.....
.... .NMMMD. ...
.8MMM. $MMN,..~MMMO.
.?MMM. .MMM?.

OMMMMZ. .,NMMMN~
.IMMMMMM. .NMMMN. .MMMMMN,
,MMMMMM$..3MD..ZMMMMMM.
=NMMMMMM,. .,MMMMMMD.
.MMMMMMMM8MMMMMMM,
.ONMMMMMMMMMMZ.
,NMMMMMMM8.
.:,.$MMMMMMM
.IMMMM..NMMMMMD.
.8MMMMM: :NMMMMN.
.MMMMMM. .MMMMM~.
.MMMMMN .MMMMM?.

Atlassian JIRA
Version : 7.2.4


If you encounter issues starting or stopping JIRA, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide


Server startup logs are located in /opt/atlassian/jira/logs/catalina.out
Using CATALINA_BASE: /opt/atlassian/jira
Using CATALINA_HOME: /opt/atlassian/jira
Using CATALINA_TMPDIR: /opt/atlassian/jira/temp
Using JRE_HOME: /opt/atlassian/jira/jre/
Using CLASSPATH: /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar
Using CATALINA_PID: /opt/atlassian/jira/work/catalina.pid
Existing PID file found during start.
Removing/clearing stale PID file.
Tomcat started.

 

Still nothing hapenned.  Our jira server is down, any ideas how I can get it back up?

0 votes
Nic Brough -Adaptavist-
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.
November 16, 2011

I'm afraid that's too vague a question to help you with. The answer you need is on the Apache page you've already quoted. It is possible to do it without Apache, but that does lose you a lot of flexibility if you need it to co-exist with other web-based systems. You could also use IIS instead of Apache, although I'm not personally too familiar with that (start at http://confluence.atlassian.com/display/JIRA/Integrating+JIRA+with+IIS )

Could you explain which bits of the Apache page aren't making sense to you?

Thomas Wendel
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.
November 16, 2011

IIS is not officially supported by Atlassian as a Webserver and I would not recommend using it.

Nic Brough -Adaptavist-
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.
September 12, 2012

Very true Thomas, that's one reason I'm not familiar with it - Apache, Nginx, Cherokee, all significantly better than IIS, so I never recommend it or use it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events