From f9f7433b985fbb55be778e7aad402af4531fccdf Mon Sep 17 00:00:00 2001 From: boban Date: Fri, 24 Apr 2026 15:02:26 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Kein=20Self-signed=20HTTPS=20mehr=20?= =?UTF-8?q?=E2=80=94=20plain=20HTTP=20bis=20LE-Cert=20vorhanden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Nginx initial: nur HTTP-Block (kein 443/self-signed) - mailwolt-apply-domains: kein self-signed Fallback; ohne LE-Cert bleibt nginx HTTP-only, mit LE-Cert wird auf HTTPS umgestellt - Monit: MariaDB per matching statt pidfile (mysqld.pid oft nicht da) - ACME-Challenge Location bereits im initialen HTTP-Block vorhanden Co-Authored-By: Claude Sonnet 4.6 --- installer.sh | 106 ++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 57 deletions(-) diff --git a/installer.sh b/installer.sh index 1c13338..fba237a 100644 --- a/installer.sh +++ b/installer.sh @@ -453,37 +453,10 @@ server { access_log /var/log/nginx/${APP_USER}_access.log; error_log /var/log/nginx/${APP_USER}_error.log; - location / { - try_files \$uri \$uri/ /index.php?\$query_string; + location ^~ /.well-known/acme-challenge/ { + root /var/www/letsencrypt; + try_files \$uri =404; } - location ~ \.php\$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:${PHP_FPM_SOCK}; - } - location ^~ /livewire/ { - try_files \$uri /index.php?\$query_string; - } - location ~* \.(jpg|jpeg|png|gif|css|js|ico|svg)\$ { - expires 30d; - access_log off; - } -} - -server { - listen 443 ssl http2; - listen [::]:443 ssl http2; - server_name _; - - ssl_certificate ${CERT}; - ssl_certificate_key ${KEY}; - ssl_protocols TLSv1.2 TLSv1.3; - - root ${APP_DIR}/public; - index index.php index.html; - - access_log /var/log/nginx/${APP_USER}_ssl_access.log; - error_log /var/log/nginx/${APP_USER}_ssl_error.log; - location / { try_files \$uri \$uri/ /index.php?\$query_string; } @@ -700,9 +673,17 @@ if [ "${SSL_AUTO}" = "1" ]; then done fi -# --- Phase 3: Finale Vhosts (LE-Cert oder self-signed Fallback) --- +# --- Phase 3: Finale Vhosts --- +# Nur HTTPS wenn LE-Cert tatsächlich vorhanden, sonst HTTP-only (kein self-signed Fallback) ( -cat <