使用apache 2.4作为代理与TLS的汇合

时间:2017-10-12 07:34:14

标签: apache reverse-proxy confluence http-proxy mod-proxy

我仍然遇到同样的错误。 “无法检查您的基本网址 您的代理配置可能有问题。“。即使在跟随link并尝试和错误几天之后。我有一个带有LetsEncryt证书的基本VPS,一个带有所有必要启用mod的apache2.4,仍然相同的错误,即使是0Auth(内置在Confluence和Jira中)也不能与同一服务器上的Jira结合使用。

我在Conector中的/conf /server.xml中的Confluence配置:

    <Connector
    port="8090"
    connectionTimeout="20000"
    redirectPort="8443"
    maxThreads="150"
    minSpareThreads="25"
    protocol="org.apache.coyote.http11.Http11NioProtocol"
    enableLookups="false"
    disableUploadTimeout="true"
    acceptCount="100"
    URIEncoding="UTF-8"
    proxyName="confluence.<my_domain>.de"
    proxyPort="443"
    secure="true"
    scheme="https"
    />

我的SSL配置:

    <IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName        confluence.<my_domain>.de
        ServerAlias       www.confleucne.<my_domain>.de

      RewriteEngine On
      RewriteCond %{REQUEST_URI} !^/synchrony
      RewriteRule ^/(.*) http://localhost:8090/$1 [P]

      <Proxy *>
          Require all granted
      </Proxy>

      ProxyPass /synchrony http://localhost:8091/synchrony

      <Location /synchrony>
          Require all granted
          RewriteEngine on
          RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
          RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
          RewriteRule .* ws://localhost:8091%{REQUEST_URI} [P]
      </Location>


        ProxyPass         / http://localhost:8090/ nocanon
        ProxyPassReverse  / http://localhost:8090/

        ProxyRequests     Off
        AllowEncodedSlashes NoDecode
        ProxyPreserveHost On
        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
        RewriteEngine on
        RewriteRule   ^/confluence/(.+) http://%{HTTP_HOST}/$1
        RequestHeader set X-Forwarded-Proto "https"
        RequestHeader set X-Forwarded-Port "443"
        SSLCertificateFile /etc/letsencrypt/live/<my_domain>.de/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/<my_domain>.de/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
    </VirtualHost>
    </IfModule>

希望有人有个主意。

0 个答案:

没有答案