原文出处: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. 需要重新启动计算机.必须重新启动计算机才能安装 SQL Server

    在开始运行中输入regedit找到HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager 在右边窗口找到PendingFi ...

  2. 当append里面的标签显示不出来的时候,用下面的方式做

     $("#result_td").append(tem1+tem3)  $("#result_td").append($(tem1+tem3)) 

  3. ado.net 学习小结

    连接数据源 Connection对象.Connection对象处于最顶层,是所有数据访问请求的关口.我们通过其暴露的属性进行配置.下面是一段连接字符串的示例. if (string.IsNullOrE ...

  4. html 包含一个公共文件

    <SCRIPT> $(document).ready(function(){ $("#foo").load("top.html"); setTime ...

  5. 解决谷歌网站Your connection is not private问题

    google 网站打不开,总是提示 Your connection is not private 等信息,针对chrome可以通过以下方式解决: 打开链接chrome://flags. 找到quic相 ...

  6. 【转自CSDN】深入 Microsoft.VisualBasic.Strings.StrConv 簡繁轉換

    深入 Microsoft.VisualBasic.Strings.StrConv 簡繁轉換 昨天又遇到一個簡繁轉換的需求, 雖然這個問題以前已經處理過了, 但是以前是用自己建立的 b52gb 和 gb ...

  7. java中Map的用法(HaspMap用法)

    public interface Map<K,V> 将键映射到值的对象.一个映射不能包含重复的键:每个键最多只能映射到一个值. import java.util.HashMap; impo ...

  8. 冒泡排序--c#

    //冒泡排序 Console.WriteLine("请输入一个程序的数值"); int[] array = { 111, 2, 5, 32, 321 }; int temp = 0 ...

  9. linux服务端的网络编程

    常见的Linux服务端的开发模型有多进程.多线程和IO复用,即select.poll和epoll三种方式,其中现在广泛使用的IO模型主要epoll,关于该模型的性能相较于select和poll要好不少 ...

  10. android入门到熟练(三)----UI界面

    1.TextView 以下只是一部分属性,还有很多属性需要在用到时候再说 <TextView android:textSize="24sp"//文字大小 android:te ...