connect JIRA to domain name

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

This widget could not be displayed.

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 Community Champion Sep 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.

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

Mizan Community Champion Sep 12, 2012

Hi Nic ,

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

Thanx .

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

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 Community Champion Sep 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

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 Community Champion Sep 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.

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 Community Champion Sep 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.

This widget could not be displayed.

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?

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

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?

This widget could not be displayed.

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?

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

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

92 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you