Gerrit 2.12.x无法view diff

    xiaoxiao2025-12-04  7

    安装配置好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.

    转载请注明原文地址: https://ju.6miu.com/read-1304601.html
    最新回复(0)