ich folgendes Problem beobachte:SSL mit paralleler Unterstützung von zwei Ports, die nicht statisch kompilierte arbeiten in Apache2 binären
Apache2 wurde mit den folgenden Flags zusammengestellt:
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--host=arm-cortexa9-linux-gnueabi \
--build=i686-host-linux-gnu \
--includedir=/usr/include/apache2 \
--enable-ssl \
--with-ssl \
--enable-ssl-staticlib-deps \
--enable-mods-static="headers rewrite gd log_config mime alias actions unixd access_compat authn_core authz_core cgi ssl http2" \
--with-apr=/opt/PHYTEC_BSPs/PTXDist/platform-phyFLEX-i.MX6/sysroot-target/usr/bin/apr-1-config \
--with-apr-util=/opt/PHYTEC_BSPs/PTXDist/platform-phyFLEX-i.MX6/sysroot-target/usr/bin/apu-1-config \
BUILDCC=/usr/bin/gcc \
--with-mpm=prefork
Dies zu einem binären führt, die hat die folgenden Module in
Compiled in modules:
core.c
mod_authn_core.c
mod_authz_core.c
mod_access_compat.c
mod_so.c
http_core.c
mod_mime.c
mod_log_config.c
mod_headers.c
mod_ssl.c
mod_http2.c
prefork.c
mod_unixd.c
mod_cgi.c
mod_actions.c
mod_alias.c
mod_rewrite.c
die ports.conf
ermöglicht lauscht auf Port 443 und 80 zusammengestellt:
Listen 80
<IfModule ssl_module>
Listen 443
</IfModule>
Die einfachste Konfiguration für eine Website ist die folgende:
<VirtualHost *:443>
<IfModule ssl_module>
SSLEngine On
SSLCertificateFile /etc/ssl/certs/cert.crt
SSLCertificateKeyFile /etc/ssl/private/key.pem
</IfModule>
</VirtualHost>
Wir werden den zweiten Port 80 für eine automatische Umleitung auf die https-Seite verwenden. Für das vorliegende Problem ist der entsprechende VirtualHost nicht notwendig.
Tatsächlich funktioniert eine Anfrage an die https-Seite (https://192.168.2.3:443
) funktioniert, wenn von ports.conf
entfernt wird. Das bedeutet, dass die SSL-Unterstützung ordnungsgemäß in die Binärdatei kompiliert wird. Wenn beideListen
Direktiven in der Datei ports.conf vorhanden sind, bleibt die Anfrage auf der https-Seite (https://192.168.2.3:443
) ohne Antwort. Nicht einmal eine ERR_ * Antwort.
Mehrere verschiedene Suchen in Bezug auf Ports, apache2, ssl konnten das Problem nicht eingrenzen. Die gleiche Konfiguration mit einer Standard-Apache2-Binärdatei funktioniert einwandfrei. Eine Erhöhung der LogLevel
zu debug
für beide afforementioned Szenarien gibt die gleiche Ausgabe:
[ssl:info] [pid 1583025418028449792] [client 192.168.2.82:51478] AH01964: Connection to child 0 established (server localhost:443)
[ssl:debug] [pid 9122084304870461440] ssl_engine_kernel.c(2143): [client 192.168.2.82:51478] AH02645: Server name not provided via TLS extension (using default/first virtual host)
[ssl:debug] [pid 9122084442309416064] ssl_engine_kernel.c(2143): [client 192.168.2.82:51478] AH02645: Server name not provided via TLS extension (using default/first virtual host)
[core:debug] [pid 4294967296] protocol.c(1893): [client 192.168.2.82:51478] AH03155: select protocol from , choices=h2,http/1.1 for server localhost
[ssl:debug] [pid 7159351466806950200] ssl_engine_kernel.c(2042): [client 192.168.2.82:51478] AH02041: Protocol: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
[ssl:debug] [pid 3905800881399477553] ssl_engine_kernel.c(366): [client 192.168.2.82:51478] AH02034: Initial (No.1) HTTPS request received for child 0 (server localhost:443)
[authz_core:debug] [pid 3358932565584236] mod_authz_core.c(809): [client 192.168.2.82:51478] AH01626: authorization result of Require all denied: denied
[authz_core:debug] [pid 30064771072] mod_authz_core.c(809): [client 192.168.2.82:51478] AH01626: authorization result of <RequireAny>: denied
[authz_core:error] [pid 30064771072] [client 192.168.2.82:51478] AH01630: client denied by server configuration: /var/www/
[ssl:debug] [pid 2113123909637] ssl_engine_io.c(1033): [client 192.168.2.82:51478] AH02001: Connection closed to child 0 with standard shutdown (server localhost:443)
eine Idee hat jemand, ob vielleicht sollte ein Modul auf den binären hinzugefügt werden? Jede Hilfe würde sehr geschätzt werden.