gerrit 配置 apache2 反向代理(转载)
Apache 2 Configuration
To run Gerrit behind an Apache server using mod_proxy, enable the necessary Apache2 modules:
a2enmod proxy_http
a2enmod ssl ; # optional, needed for HTTPS / SSL
Configure an Apache VirtualHost to proxy to the Gerrit daemon, setting the ProxyPass line to use the http:// URL configured above. Ensure the path of ProxyPass and httpd.listenUrl match, or links will redirect to incorrect locations.
<VirtualHost *>
ServerName review.example.com ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On <Proxy *>
Order deny,allow
Allow from all
</Proxy> AllowEncodedSlashes On
ProxyPass /r/ http://127.0.0.1:8081/r/ nocanon
</VirtualHost>
The two options AllowEncodedSlashes On and ProxyPass .. nocanon are required since Gerrit 2.6.
SSL
To enable Apache to perform the SSL processing, use proxy-https:// in httpd.listenUrl within Gerrit’s configuration file, and enable the SSL engine in the Apache VirtualHost block:
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile conf/server.crt
SSLCertificateKeyFile conf/server.key ... same as above ...
</VirtualHost>
See the Apache mod_ssl documentation for more details on how to configure SSL within the server, like controlling how strong of an encryption algorithm is required.
Troubleshooting
If you are encountering Page Not Found errors when opening the change screen, your Apache proxy is very likely decoding the passed URL. Make sure to either useAllowEncodedSlashes On together with ProxyPass .. nodecode or alternatively a mod_rewrite configuration with AllowEncodedSlashes NoDecode set.
From:http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/config-reverseproxy.html
gerrit 配置 apache2 反向代理(转载)的更多相关文章
- CentOS 7 学习(二) 配置Nginx反向代理
CentOS 7 学习(二) 配置Nginx反向代理 Nginx可以通过php-fpm来运行PHP程序,也可以转向apache,让apache调用php程序来运行. 不过对于Nginx来说,其反向代理 ...
- CentOS安装Nginx,并配置nodejs反向代理
安装介绍 安装位置:/usr/local/nginx nginx安装包下载地址:http://nginx.org/download/nginx-1.7.11.tar.gz 安装依赖软件 安装nginx ...
- 为docker私有registry配置nginx反向代理
公司的Docker私有registry已经搭建好了,用官方的registry image很容易就搭建好了.现在就是要用nginx的反向代理把它放出来,以便在外网可以访问. 我的上一篇blog 讲了如何 ...
- 配置apache反向代理进行跨域
配置apache反向代理 打开配置文件httpd.conf 开启 proxy_http_module 和 proxy_module 模块,将#号删除 #LoadModule proxy_module ...
- 使用SSL配置Nginx反向代理的简单指南
反向代理是一个服务器,它接收通过Web发出的请求,即http和https,然后将它们发送到后端服务器(或服务器).后端服务器可以是单个或一组应用服务器,如Tomcat,wildfly或Jenkins等 ...
- Nginx配置实例-反向代理实例:根据访问的路径跳转到不同端口的服务中
场景 Ubuntu Server 16.04 LTS上怎样安装下载安装Nginx并启动: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/detai ...
- 配置LANMP环境(7)-- 配置nginx反向代理,与配置apache虚拟主机
一.配置nginx反向代理 1.修改配置文件 vim /etc/nginx/nginx.conf 在35行http下添加一下内容: include /data/nginx/vhosts/*.conf; ...
- apache2反向代理node.js应用
在之前记录的随笔中,只是介绍了怎么在apache2中使用proxy模块,后来查到了一些资料,可以通过下面网址查看配置块的详细参数信息 http://man.ddvip.com/soft/apache2 ...
- apache2反向代理
1.安装 Apache2 sudo apt-get install apache2 2.重启服务器 sudo /etc/init.d/apache2 restart 3.虚拟主机配置 启用这几个模块 ...
随机推荐
- python设置字体颜色
在开发项目过程中,为了方便调试代码,经常会向stdout中输出一些日志,默认的这些日志就直接显示在了终端中.而一般的应用服务器,第三方库,甚至服务器的一些通告也会在终端中显示,这样就搅乱了我们想要的信 ...
- windows7旗舰版激活密钥永久版免费分享
windows7之家不仅提供精品Win7教程 给大家,加上这个windows7激活密匙还帮大家解决windows7系统激活问题,包括win7旗舰版 windows7安装版这些. 用的是Windows7 ...
- Tkinter
单个选项 from Tkinter import * root = Tk() v = IntVar() Radiobutton(root, text="One", variable ...
- Cg Programming/Vertex Transformations
https://en.wikibooks.org/wiki/Cg_Programming/Vertex_Transformations
- maven项目依赖小试牛刀
1.先建立空的wbh-parent,留下pom.xml;将项目中用的jar包依赖全放进去: 2.建立core项目,当然全是maven的,这个建好后,是用来让其他项目引用的,所以必须用maven ins ...
- [原]一个简单的Linux TCP Client所涉及到的头文件
今天在Linux环境下写了一个最简单的TCP Client程序,没想到Linux环境下的头文件竟然这么分散,让我这样的菜鸟很是郁闷啊.编译成功的代码如下: #include <iostream& ...
- Hibernate3回顾-3-Session管理
3.Session管理 仅为个人理解.请指正 3.1背景 由于Configuration的创建耗费系统的资源.所以有必要只将Configuration实例化一次,之后通过SessionFactory获 ...
- .NET导入openssl生成的公钥之BEGIN RSA PUBLIC KEY
.NET导入openssl生成的公钥之BEGIN RSA PUBLIC KEY 我得到了一个公钥,形式如下 -----BEGIN RSA PUBLIC KEY----- MIGJAoGBAMroxz3 ...
- UI—代理简单使用
代理:又叫委托 通俗的说是自己不能办的事 委托给别人去办.比如UITextField,UIAlertView都使用了代理 写代理的步骤: 1.声明代理里面的协议方法(@protocl) 2.声明协议的 ...
- 【linux】关机重启命令
shutdown: [参数][时间] -h:关机 -r:重启 -c:取消上一次关机或重启 [root@paulinux ~]# shutdown -h now ##马上重启 [root@paulinu ...