zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Android studio USB连接失败
    BZOJ 1013 [JSOI2008]球形空间产生器sphere
    UVA1025
    noip2016天天爱跑步
    noip2015运输计划
    noip2012借教室
    BZOJ 1597: [Usaco2008 Mar]土地购买
    BZOJ1010: [HNOI2008]玩具装箱toy
    BZOJ1026: [SCOI2009]windy数
    BZOJ1801:[Ahoi2009]chess 中国象棋
  • 原文地址:https://www.cnblogs.com/xiaoerlang/p/3594470.html
Copyright © 2011-2022 走看看