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

  • 相关阅读:
    十几个remote control software
    chromedriver bug
    跟我一起学ruby (转)
    ruby两套教程
    java把函数作为参数传递
    java如何在函数中调用主函数的数组
    Java HashSet和LinkedHashSet的用法
    java文件读写操作
    RAID详细介绍
    Apriori算法
  • 原文地址:https://www.cnblogs.com/xiaoerlang/p/3594470.html
Copyright © 2011-2022 走看看