Laudende Default seite entfernen
parent
bb7d0f11d1
commit
705e88ae7a
|
|
@ -10,8 +10,8 @@ server {
|
|||
allow all;
|
||||
}
|
||||
|
||||
## __HTTP_BODY__
|
||||
__HTTP_BODY__
|
||||
}
|
||||
|
||||
# ===================== HTTPS (Port 443) ====================
|
||||
## __SSL_SERVER_BLOCK__
|
||||
__SSL_SERVER_BLOCK__
|
||||
|
|
@ -15,6 +15,11 @@ apt-get -y -o Dpkg::Options::="--force-confdef" \
|
|||
unzip curl composer git certbot python3-certbot-nginx \
|
||||
ca-certificates rsyslog sudo openssl monit acl netcat-openbsd
|
||||
|
||||
# <<< Apache konsequent entfernen >>>
|
||||
systemctl disable --now apache2 >/dev/null 2>&1 || true
|
||||
apt-get -y purge 'apache2*' >/dev/null 2>&1 || true
|
||||
apt-get -y autoremove >/dev/null 2>&1 || true
|
||||
|
||||
log "Systemuser/Dirs …"
|
||||
id vmail >/dev/null 2>&1 || adduser --system --group --home /var/mail vmail
|
||||
id "$APP_USER" >/dev/null 2>&1 || adduser --disabled-password --gecos "" "$APP_USER"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ NGINX_SITE_LINK="/etc/nginx/sites-enabled/${APP_USER}.conf"
|
|||
ACME_ROOT="/var/www/letsencrypt"
|
||||
install -d -m 0755 "$ACME_ROOT"
|
||||
|
||||
# Default-Sites konsequent entfernen (verhindert doppelten default_server)
|
||||
rm -f /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default || true
|
||||
|
||||
# HTTP/2 prüfen
|
||||
NGINX_HTTP2_SUFFIX=""
|
||||
if nginx -V 2>&1 | grep -q http_v2; then
|
||||
|
|
@ -126,6 +129,7 @@ if [[ $SSL_ENABLED -eq 1 ]]; then
|
|||
render="${render/__SSL_SERVER_BLOCK__/$SSL_BLOCK}"
|
||||
else
|
||||
render="${render/__HTTP_BODY__/$HTTP_BODY_APP}"
|
||||
# HTTPS-Block komplett entfernen
|
||||
render="${render/__SSL_SERVER_BLOCK__/}"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue