It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA on multiple domains

Hi,

I have configured IIS as an ARR proxy to JIRA and I access it on jira.mydomain.com (which is proxied to localhost:8080). I need to also access JIRA on support.mydomain.com. Is there a way to setup JIRA (and IIS) to work with 2 domains?

Thank you

3 answers

I would do this through through your DNS provider. Make both names point to the same ip address. I have //localhost:8080, //bugs.mydomain.com and //xyz:8080 all pointing to the same host.

Yes, but what is your Base URL in JIRA? I have set an ARR proxy in IIS which redirects all requests for jira.mydomain.com to localhost:8080. In JIRA I have also edited the connector to use proxying and my JIRA Base URL is jira.mydomain.com.

The above means that whenever I access JIRA via any means (IP, domain that points to it) it will automatically redirect me to jira.mydomain.com. This is done by JIRA, not IIS.

I tried what you proposed but I got errors with the gadgets on my dashboard.

I wonder if a second connector listening on port 8081 would do the trick...

Or maybe you mean that I don't use proxying at all and just make all my DNS names point to JIRA?

Thank you

You can only have one base url in Jira, so you need to decide which domain is going to be the primary place to run it and stick with that.

You could however use Apache to rewrite urls so that it looks like Jira is working on several domains, but internal links and emails will still all be based on the base url

I don't know about IIS, but it can be done with Apache.

1. Add to JIRA_INSTALL/conf/server.xml two new connectors (AJP and HTTP on 8081)

 <Connector port="8081"
  maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true" bindOnInit="false"
  scheme="https"
  proxyName="support.mydomain.com"
  proxyPort="443" />

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

2. Install Apache HTTP Server and create two virtual hosts. The second one will use Substitute to replace the base URL inside HTML responses:

<VirtualHost _default_:443>
    ServerName jira.mydomain.com
...
    ProxyPass    / ajp://localhost:8009/
    ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>
<VirtualHost *:443>
    ServerName support.mydomain.com
...
    ProxyPass        /  http://localhost:8081/
    ProxyPassReverse    /  http://localhost:8081/

    RequestHeader unset Accept-Encoding
    AddOutputFilterByType SUBSTITUTE text/html
    Substitute "s/jira.mydomain.com/support.mydomain.com/i"
</VirtualHost>

3. Set the base URL to first domain https://jira.mydomain.com

This does mean users trying to access it on the second domain might run into display problems, and then end up accessing it over the first domain within a few clicks.  Seriously, not worth doing.

Is this still a limitation?

 

Our group owns several companies and we need to use our JIRA service desk to handle customers from each of these companies independently with separate branding.

 

I know that you can brand the portal on a per-project basis, but it still leaves the question on having JIRA support multiple domains and reply with links back to the proper domain on a per-project basis.

 

Did you make any progress with this?

I'm facing a similar issue and at the moment I think running multiple instances of JIRA is the only way to do it...

Synchronising users should be OK if there is a stand-alone user directory (e.g. Crowd or Active Directory).

Not so confident about being able to link between issues in different JIRAs but I believe one JIRA instance can be linked via application links to any number of other JIRA instances, I just haven't tried it yet...

Same answer - you can only run it on one domain because there's only one base url.

You are right in that you would need multiple servers if you want multiple url access to be done properly (rather than just a redirect to the right place)

@Nic Brough {Adaptavist} Is it possible to add a client-side script that will rewrite the URLs on the page?

I realize it's not the best practice (and never will be), but having something is better than having nothing at all. In my case, I have to carry a second laptop just to be able to use the original URL for Jira...

Yes, you could run it through a proxy on the wrong address, but you'll need to do a lot of rewriting, including in both directions, and the urls in emails and exports are still going to be the base url.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

261 views 1 2
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you