HTTPS über Proxy ist nicht möglich

Kalito

Erfahrenes Mitglied
Hallo,

ich habe eine bestehende Verbindung zwischen einem Openfire-Server und einem Webserver mittels http-bind. diese Verbindung läuft momentan via http. Dies möchte ich auf https ändern.

Auf meinem Webserver habe ich einen Proxy laufen, der die Chatanfragen vom restlichen Datenverkehr trennt.

Laut Error-Log kommt folgende Fehlermeldung:
Code:
[Thu Nov 02 19:21:00 2017] [error] [client meineIP] SSL Proxy requested for web1:443 but not enabled [Hint: SSLProxyEngine]
[Thu Nov 02 19:21:00 2017] [error] proxy: HTTPS: failed to enable ssl support for meineIP:7445 (chat1)

Hin und wieder kommt auch folgende Fehlermeldung, wo ich mir aber nicht sicher bin, ob diese relevant ist. Da sie auch zeitlich nicht ganz passt und eine andere IP angegeben wird:
Code:
[Thu Nov 02 19:23:47 2017] [error] [client otherIP] mod_security: Access denied with code 500. Pattern match "^(HEAD)$" at REQUEST_METHOD [severity "EMERGENCY"] [hostname "meineURL"] [uri "/"]

Laut Access-Log wird folgendes ausgegeben:
Code:
meineIP - - [02/Nov/2017:19:21:00 +0100] "GET /chat/?<body rid=1 /> HTTP/1.1" 500 7158 "-" "curl/7.19.7 (x86_64-suse-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8j zlib/1.2.7 libidn/1.10"

Folgenden Aufbau habe ich in der /etc/apache2/vhost.d

01_web1-ssl_with_proxy_macro.conf:
Code:
<IfModule mod_macro.c>
    <Macro WEB_SSL_PROXY $__IP $__ProxyHost  $__ProxyPort $__Url>
    <IfDefine SSL>
    <IfDefine !NOSSL>
    <VirtualHost $__IP:443>

         DocumentRoot "/"
         ServerName web1:443
         ServerAlias meineURL:443
         ServerAdmin ich@admin.de

         SetEnvIf Request_URI clustertest.html clustertestreq
         ErrorLog /var/log/apache2/web1-error_log
         CustomLog /var/log/apache2/web1-access_log combined env=!clustertestreq

         SSLEngine on
         SSLProtocol All -SSLv2 -SSLv3
         SSLHonorCipherOrder On
         SSLCipherSuite EC********************
         SSLCertificateFile /etc/apache2/ssl.crt/prod.crt
         SSLCertificateKeyFile /etc/apache2/ssl.key/prod.key
         SSLCertificateChainFile /etc/apache2/ssl.crt/intermediate.crt

        SetEnvIf User-Agent ".*MSIE.*" \
        nokeepalive ssl-unclean-shutdown \
        downgrade-1.0 force-response-1.0

        <Directory "/">
            AllowOverride Authconfig
            Options -Indexes FollowSymLinks
            Order allow,deny
            Allow from all
            <LIMIT PUT DELETE>
                Order deny,allow
                Deny from all
            </LIMIT>
        </Directory>

       <IfModule mod_rewrite.c>
           RewriteEngine       on
           RewriteLog      "/var/log/apache2/rewrite.log"
           RewriteLogLevel 0
           Use www_Rewrite
       </IfModule>

       Alias /error/ "meineURL/error/"
       <IfModule mod_negotiation.c>
           <IfModule mod_include.c>
           <Directory "meineURL/error">
                AllowOverride None
                Options IncludesNoExec
                AddOutputFilter Includes html
                AddHandler type-map var
                Order allow,deny
                Allow from all
                LanguagePriority en cs de es fr it nl sv pt-br ro
                ForceLanguagePriority Prefer Fallback
            </Directory>

      ErrorDocument 400 /error/error.html
      ErrorDocument 401 /error/error.html
      ErrorDocument 403 /error/404error.html
      ErrorDocument 404 /error/404error.html
      ErrorDocument 405 /error/error.html
      ErrorDocument 408 /error/error.html
      ErrorDocument 410 /error/410error.html
      ErrorDocument 411 /error/error.html
      ErrorDocument 412 /error/error.html
      ErrorDocument 413 /error/error.html
      ErrorDocument 414 /error/error.html
      ErrorDocument 415 /error/error.html
      ErrorDocument 500 /error/500error.html
      ErrorDocument 501 /error/500error.html
      ErrorDocument 502 /error/500error.html
      ErrorDocument 503 /error/500error.html
      ErrorDocument 506 /error/500error.html
    </IfModule>
  </IfModule>

    <IfModule mod_expires.c>
        ExpiresActive on
        ExpiresDefault                  "access plus 2 seconds"

        ExpiresByType image/jpg         "access plus 1 days"
        ExpiresByType image/gif         "access plus 1 days"
        ExpiresByType image/jpeg        "access plus 1 days"
        ExpiresByType image/png         "access plus 1 days"
        ExpiresByType text/css          "access plus 1 days"
        ExpiresByType text/javascript   "access plus 1 days"
        ExpiresByType text/x-js         "access plus 1 days"
        ExpiresByType application/javascript "access plus 1 days"
   </IfModule>

#Browserweiche fue den Chat
   <IfModule mod_proxy.c>
      ProxyPreserveHost Off
                <Proxy *>
                        Order deny,allow
                        Allow from all
                </Proxy>

                ProxyPass /$__Url https://$__ProxyHost:$__ProxyPort/http-bind/ retry=0
                ProxyPassReverse /$__Url https://$__ProxyHost:$__ProxyPort/http-bind/

                #ServerName localhost
      </IfModule>


</VirtualHost>                                 

# End SSL
</IfDefine>
# End !NOSSL
</IfDefine>
</Macro>
</IfModule>

99_start.conf:
Code:
<IfModule mod_macro.c>
Use SLGIWEB_SSL_PROXY meineIP chat1 7445 chat/
</IfModule>

Wenn ich beim Port statt 7445 7070 angebe und statt https http, dann kann ich erfolgreich eine Verbindung via http aufrufen.
 
Hi,
habe die Option nun explizit eingestellt. Nach dem durchstarten der Apache kommt folgende Fehlermeldung im Error-Log

Code:
[Fri Nov 03 13:23:22 2017] [error] (502)Unknown error 502: proxy: pass request body failed to Chatserver-IP(chat1)
[Fri Nov 03 13:23:22 2017] [error] proxy: pass request body failed to Chatserver-IP:7445 (chat1) from meineIP ()

Hab daher noch

Code:
SSLProxyCheckPeerCN off

mit eingetragen. Trotz des Eintrages kommt die gleiche Fehlermeldung. Wenn ich "SSLProxyCheckPeerName Off" angebe, dann kommt die Fehlermeldung, dass er diese Bezeichnung nicht kennt.
 
Zurück