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 <