原文出处:http://blog.chenlb.com/2012/01/nginx-proxy-jira-and-confluence.html

jira 和 confluence 想部署到同一台机器上。都使用 80 端口访问。使用 nginx 代理吧。直接使用 proxy_pass http://127.0.0.1:8080 jira 的首页小插件不太好使。发现使用 try_files 可以。

加一个 jira_proxy.conf 文档。如:

#cd /home/admin/nginx
#vi conf/jira_proxy.conf

  1. proxy_connect_timeout 30s; 
  2. proxy_send_timeout 120; 
  3. proxy_read_timeout 120; 
  4. proxy_buffer_size 32k; 
  5. proxy_buffers 4 32k; 
  6. proxy_busy_buffers_size 64k; 
  7. proxy_redirect off; 
  8. proxy_hide_header Vary; 
  9. proxy_set_header Accept-Encoding ''; 
  10. proxy_set_header Host $host; 
  11. proxy_set_header Referer $http_referer; 
  12. proxy_set_header Cookie $http_cookie; 
  13. proxy_set_header X-Real-IP $remote_addr; 
  14. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 

nginx.conf

  1. server { 
  2.     listen       80; 
  3.     server_name  jira.example.com; 
  4.  
  5.     location / { 
  6.             try_files $uri @jira; 
  7.     } 
  8.  
  9.     location @jira { 
  10.             internal; 
  11.             proxy_pass http://127.0.0.1:8080; 
  12.             include jira_proxy.conf; 
  13.     } 
  14.  
  15. server { 
  16.     listen       80; 
  17.     server_name  wiki.example.com; 
  18.  
  19.     location / { 
  20.             try_files $uri @confluence; 
  21.     } 
  22.  
  23.     location @confluence { 
  24.             internal; 
  25.             proxy_pass http://127.0.0.1:8090; 
  26.             include jira_proxy.conf; 
  27.     } 

try_files 真是代理的好帮手。

版本说明
nginx/1.0.10
Atlassian JIRA v4.4.4
Atlassian Confluence 4.1.2

Nginx 代理 jira 和 confluence的更多相关文章

  1. nginx代理https站点(亲测)

    nginx代理https站点(亲测) 首先,我相信大家已经搞定了nginx正常代理http站点的方法,下面重点介绍代理https站点的配置方法,以及注意事项,因为目前大部分站点有转换https的需要所 ...

  2. 【Nginx】nginx 代理 Haproxy 怎么设置?

    由于Haproxy是通过 url 正则匹配 识别 的,nginx代理到 haproxy需要设置 proxy_set_header Host 为 haproxy的目标 url 直接上配置 upstrea ...

  3. Nginx代理与负载均衡配置与优化

    Nginx代理 Nginx从0.7.48版本开始,支持了类似Squid的缓存功能.Nginx的Web缓存服务主要由proxy_cache相关指令集和fastcgi_cache相关指令集构成,前者用于反 ...

  4. go 语言的库文件放在哪里?如何通过nginx代理后还能正确获取远程地址

    /usr/local/Cellar/go/1.5.1/libexec/src/ 他的RemoteAddr 是从哪里获取? func (c *conn) RemoteAddr() Addr { if ! ...

  5. nginx代理tomcat后,tomcat获取真实(非proxy,非别名)nginx服务端ip端口的解决方案

    nginx代理tomcat后,tomcat获取服务端ip端口的解决方案 1.注意修改nginx配置代理,标红地方 #user nginx; worker_processes ; error_log l ...

  6. CentOS 7 安装Subversion, 并用Nginx代理

    环境:CentOS 7.3.1611 分三步:第一步:安装subversion第二步:安装httpd第三步:安装nginx 操作步骤: 安装subversion, 命令 -> yum -y in ...

  7. Nginx代理TCP服务

    利用nginx代理tpc 部署nginx 安装编译所需环境 # yum install -y apr-devel apr-util-devel pcre-devel openssl-devel 添加w ...

  8. ubuntu下发布asp.net core并用nginx代理之旅

    asp.net core 1.0.1发布已有些日子了,怀着好奇的心情体验了把ubuntu下的asp.net core 系统运行环境:ubuntu 16.0.4 for developer 首先搭建.n ...

  9. Nginx代理转发Apache+svn

    1.安装svn和httpd yum install httpd yum install subversion mod_dav_svn 创建仓库目录 mkdir -p /var/www/svn 3.创建 ...

随机推荐

  1. Linux系统ifconfig命令找不到,centos ifconfig Command not found

    centos ifconfig Command not found,Linux系统ifconfig命令找不到 >>>>>>>>>>>& ...

  2. 雷鸟(Thunderbird)收取Gmail出错,收到警告邮件

    如题,每次打开thunderbird都会收到以下提醒邮件,后来发现,只要将thunderbird中和google服务有关的插件卸载掉就可以了 We prevented the sign-in atte ...

  3. CoreAnimation6-基于定时器的动画和性能调优

    基于定时器的动画 定时帧 动画看起来是用来显示一段连续的运动过程,但实际上当在固定位置上展示像素的时候并不能做到这一点.一般来说这种显示都无法做到连续的移动,能做的仅仅是足够快地展示一系列静态图片,只 ...

  4. POJ 1159 Palindrome(LCS)

    题目链接:http://poj.org/problem?id=1159 题目大意:给定一串字符,添加最少的字符,使之成为回文串. Sample Input 5 Ab3bd Sample Output ...

  5. (传智博客)tp开发第一天之tp执行流程分析笔记

    1.入口文件index.php 2.ThinkPHP/ThinkPHP.php require THINK_PATH.'Common/runtime.php'; 3.ThinkPHP/Common/r ...

  6. 【转】oracle数据库NUMBER数据类型

    原文:http://www.jb51.net/article/37633.htm NUMBER ( precision, scale)a)  precision表示数字中的有效位;如果没有指定prec ...

  7. 通过javascript实现页面的横竖屏固定

    javascript是不能固定页面是横屏还是竖屏的,但是我们可以通过另外一种思路来监听window.orientation状态,假设我们要固定页面为横屏显示,则当window.orientation返 ...

  8. java.lang.UnsupportedClassVersionError(Unsupported major.minor version 49.0)报错

    报错截图如下:

  9. 聊一聊c++中指针为空的三种写法 ----->NULL, 0, nullptr

    看到同事用了一下nullptr.不是很了解这方面东东,找个帖子学习学习 http://www.cppblog.com/airtrack/archive/2012/09/16/190828.aspx N ...

  10. 添加三维动画 demo

    - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typica ...