RTFM.WIKI

Ordnung muß sein. Ordnung über alles (18+)

Инструменты пользователя

Инструменты сайта


linux:nginx:jira

Настройка nginx для работы Jira

Jira прокси

В файле $JIRA_INSTALL/conf/server.xml нужно установить

  • proxyName
  • proxyPort
  • scheme
  • secure
<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" 
                     
           proxyName="jira.domain.com" 
           proxyPort="443" 
           scheme="https" 
           secure="true" 
/>

Для работы с MySQL нужно скопировать драйвер в $JIRA_INSTALL/lib

Конфиг для nginx

upstream jira {
  server  127.0.0.1:8081 fail_timeout=0;
}
 
# listen on HTTP2/SSL
server {
  listen       443 ssl http2;
  server_name  jira.domain.com;
 
  ssl_certificate /etc/letsencrypt/live/jira.domain.com/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/jira.domain.com/privkey.pem;
 
  location / {
    client_max_body_size 10m;
    proxy_set_header  Host $host:$server_port;
    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;
    # hand the request off to jira on non-ssl
    proxy_pass        http://jira;
  }
}
 
server {
  listen       80;
  server_name  jira.domain.com;
  root         /opt/atlassian/jira;

  location ~ /.well-known {
    allow all;
  }

  location / {
    return 302 https://jira.domain.com;
  }
}

Установка Jira

–> Установка Jira#

$ wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-8.0.0-x64.bin
$ chmod a+x atlassian-jira-software-8.0.0-x64.bin 
$ sudo ./atlassian-jira-software-8.0.0-x64.bin

Unpacking JRE ...
Starting Installer ...
Feb 13, 2019 6:45:47 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Feb 13, 2019 6:45:47 PM java.util.prefs.FileSystemPreferences$2 run
INFO: Created system preferences directory in java.home.

This will install JIRA Software 8.0.0 on your computer.
OK [o, Enter], Cancel [c]

Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing JIRA installation [3]

Where should JIRA Software be installed?
[/opt/atlassian/jira]

Default location for JIRA Software data
[/var/atlassian/application-data/jira]

Configure which ports JIRA Software will use.
JIRA requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access JIRA
through your browser. The Control port is used to startup and shutdown JIRA.
Use default ports (HTTP: 8080, Control: 8005) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]

JIRA can be run in the background.
You may choose to run JIRA as a service, which means it will start
automatically whenever the computer restarts.
Install JIRA as Service?
Yes [y, Enter], No [n]

Details on where JIRA Software will be installed and the settings that will be used.
Installation Directory: /opt/atlassian/jira 
Home Directory: /var/atlassian/application-data/jira 
HTTP Port: 8080 
RMI Port: 8005 
Install as service: Yes 
Install [i, Enter], Exit [e]

Extracting files ...
                                                                           
Please wait a few moments while JIRA Software is configured.
Installation of JIRA Software 8.0.0 is complete
Start JIRA Software 8.0.0 now?
Yes [y, Enter], No [n]

Please wait a few moments while JIRA Software starts up.
Launching JIRA Software ...
Installation of JIRA Software 8.0.0 is complete
Your installation of JIRA Software 8.0.0 is now ready and can be accessed
via your browser.
JIRA Software 8.0.0 can be accessed at http://localhost:8080
Finishing installation ...

←-

Ссылки

Обсуждение

Ваш комментарий. Вики-синтаксис разрешён:
 
linux/nginx/jira.txt · Последнее изменение: 2019/03/11 10:23 — 127.0.0.1