Gerrit 2.12.x无法view diff

安装配置好gerrit之后,push完代码之后,无法打开每一个非工程根目录下的文件进行view。

报错如下:

The page you requested was not found, or you do not have permission to view this page.


原因是因为:

(源自:https://bugs.chromium.org/p/gerrit/issues/detail?id=3081&q=The%20page%20you%20requested%20was%20not%20found%2C%20or%20you%20do%20not%20have%20permission%20to%20view%20this%20page.&colspec=ID%20Type%20Stars%20Milestone%20Status%20Priority%20Owner%20Summary

https://review.cyanogenmod.org/Documentation/config-reverseproxy.html#_apache_2_configuration)


To run Gerrit behind an Apache server using 'mod_proxy', enable thenecessary 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 configuredabove. 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.


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值