V
V
Vetal_12017-12-05 14:47:34
Nginx
Vetal_1, 2017-12-05 14:47:34

How to set up Jira via nginx?

I want to wrap JIRA through nginx. According to all the manuals, I set up and caught errors with loading the dashboard (not rendered at all) or displaying gadgets (view _gadget_activity_).
Perhaps the problem is in the configuration of Jira itself?
Tell me, otherwise I re-read a bunch of manuals and the result, alas, is one (
5a268718d14f0899254589.png5a26872a79e70864634376.png5a268867bff28521030543.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Chernykh, 2017-12-05
@sashkets

when we used jira, we had this config
server {
listen 443 ssl;
server_name jira.****.ua;
charset utf-8;
include inc/ssl.****.ua.conf;
# include inc/restricted.conf;
location / {
proxy_pass http://jira.****.ua:8080;
proxy_hide_header Authorization;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Client-Ip $remote_addr;
proxy_set_header X-Client-Proto $scheme;
proxy_set_header X-Client-Host $host;
proxy_set_header X-Clietn-Port $remote_port;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

A
Alexander Kuzmenko, 2017-12-05
@therionkiev

In the jira, in the settings you need to change the base url to the one you need. The rest is up to the nginx proxy
Nginx:
server {
include template/listen_https;
server_name jira.xxxxxxxxxx www.jira.xxxxxxxxxx;
set $server_url 'jira.xxxxxxxxxx';
access_logoff;
error_log /var/log/nginx/jira.xxxxxxxxxx.error.log error;
include template/deny_hidden_files;
include template/cache_rules;
include template/ssl_headers;
include template/letsencryptssl;
ssl_certificate /etc/letsencrypt/live/jira.xxxxxxxxxx/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/jira.xxxxxxxxxx/privkey.pem;
location / {
gzip off;
proxy_buffers 8 32k;
proxy_buffer_size 64k;
proxy_request_buffering off;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://atlassian-jira;
}
}
template/listen_https:
listen 443 ssl;
listen [::]:443 ssl;
conf.d/upstreams.conf:
upstream atlassian-jira {
server 192.168.122.11:8080 fail_timeout=0;
}
upstream atlassian-confluence {
server 192.168.122.11:8090 fail_timeout=0;
}
upstream atlassian-hipchat {
server 192.168.122.116:80 fail_timeout=0;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question