Nginx代理Jira的配置详细步骤


1、需求

安装完jira后希望通过别的服务器也可以访问,或者希望能共享80端口,那么可以通过nginx来代理jira,因为由于jira中有很多的跳转动作,所以如果你使用的jira端口不是默认的80端口,则跳转的url会被分配默认的80端口,而不是你希望的设置端口。


2、nginx配置

nginx的安装很简单,我们直接贴出nginx中代理jira的server部分的配置


server {
listen 8000;
server_name xxx.xxx.xxx.xxx;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
#root html;
#index index.html index.htm index.php;
port_in_redirect off;

location ~* ^.+/.(jpg|jpeg|gif|png|swf|rar|zip|css|js)$ { ##static file
rewrite ^(.*) http://xxx.xxx.xxx.xxx:8000/$1;
break;
}

location / {
proxy_pass http://xxx.xxx.xxx.xxx:8000;
proxy_redirect off;
proxy_set_header Host $host:$server_port; ##重点在$server_port
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_max_temp_file_size 0;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_hide_header Vary;
proxy_set_header Accept-Encoding '';
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_cookie;
}
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.


QR Code
微信扫一扫,欢迎咨询~

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 155-2731-8020
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

手机不正确

公司不为空