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

  • 相关阅读:
    unigui1404在delphi10.2.2安装
    入库单的一些业务逻辑
    mormot日志
    论MORMOT序列的JSON格式
    线程安全的队列
    SynDBOracle.pas
    轻量级的REST中间件
    TQuery
    100亿数据1万属性数据架构设计
    愤怒的TryCatch
  • 原文地址:https://www.cnblogs.com/xiaoerlang/p/3594470.html
Copyright © 2011-2022 走看看