Is there any way to configre Nginx Reverse-Proxy for Jira Cloud application?

Maxim Muravyev January 17, 2019

I'm trying to setup Nginx Reverse-Proxy for Jira Cloud application in order to make caching on our side because sometimes Jira Cloud works slowly for us.

I have configuration file below.

 

server {

  server_name jira.company.local;
  listen 80;
  location / {

    return 301 https://$server_name$request_uri;
  }
}


server {

  listen 443 default ssl;

  server_name jira.company.local;
  root /usr/share/nginx/html;

  ssl_certificate /etc/nginx/cert.crt;
  ssl_certificate_key /etc/nginx/cert.key; # self-signed

  ssl on;
  ssl_session_cache builtin:1000 shared:SSL:10m;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
  ssl_prefer_server_ciphers on;

  include /etc/nginx/default.d/*.conf;

  client_max_body_size 10M;

  location / {

    proxy_pass https://company.atlassian.net:443;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

  }

  error_page 404 /404.html;
  location = /40x.html {

  }

  error_page 500 502 503 504 /50x.html;
  location = /50x.html {

  }
}

And it doesn't work.

I see error as on the attached screenshot.

Probably should I add/change something in Nginx configuration file?

Screenshot from 2019-01-17 17-46-46.png

3 answers

0 votes
Pallavi Swamy May 5, 2022

I'm curious, did you get this working? Pls share details. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 5, 2022

No, they did not.

To make Jira work with a proxy, you have to 

  1. Set up the proxy to talk to Jira and present itself to the intended network
  2. Tell Jira it is behind a proxy
  3. Change Jira's base url to match the proxy

You don't have access to items 2 and 3 on Cloud.

0 votes
James Chi November 30, 2021

I didn't do this, but, 

I think the proxy should be forward proxy server (or cache proxy).

By configuring proxy.pac file carefully, you can make only jira traffic pass thru your cache  server. 

Hope this help.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2021

It won't work.

To make Jira work with a proxy, you have to 

  1. Set up the proxy to talk to Jira and present itself to the intended network
  2. Tell Jira it is behind a proxy
  3. Change Jira's base url to match the proxy

You don't have access to items 2 and 3 on Cloud.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 17, 2019

For Atlassian services to function correctly behind a proxy, the systems running them need to know that they are being proxied, so you need to configure them on the service side.

You cannot do that to Cloud servers.

Maxim Muravyev January 17, 2019

Probably, is there a way to organize cache server for Jira Cloud?

Like ctrlyare likes this

Suggest an answer

Log in or Sign up to answer