Dovecot Systax Problem
parent
ef806c4889
commit
ed88fdfe17
|
|
@ -115,14 +115,88 @@ fi
|
||||||
# echo "}" >> "$outfile"
|
# echo "}" >> "$outfile"
|
||||||
#}
|
#}
|
||||||
|
|
||||||
build_site_http_only(){
|
#build_site_http_only(){
|
||||||
local host="$1" outfile="$2"
|
# local host="$1" outfile="$2"
|
||||||
|
#
|
||||||
|
# # DEV: IP-Zugriff ohne Hostname → default_server + server_name _
|
||||||
|
# local def=""
|
||||||
|
# if [[ "${DEV_MODE}" = "1" ]]; then
|
||||||
|
# def=" default_server"
|
||||||
|
# host="_"
|
||||||
|
# fi
|
||||||
|
# [[ -z "${host}" || "${host}" = "_" ]] && host="_"
|
||||||
|
#
|
||||||
|
# cat > "$outfile" <<CONF
|
||||||
|
## --- ${host} : HTTP (kein Redirect, kein TLS; läuft hinter Reverse-Proxy/DEV) ---
|
||||||
|
#server {
|
||||||
|
# listen 80${def};
|
||||||
|
# listen [::]:80${def};
|
||||||
|
# server_name ${host};
|
||||||
|
#
|
||||||
|
# # ACME HTTP-01 (optional; meist übernimmt das der Proxy)
|
||||||
|
# location ^~ /.well-known/acme-challenge/ {
|
||||||
|
# root ${ACME_ROOT};
|
||||||
|
# allow all;
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# root ${APP_DIR}/public;
|
||||||
|
# index index.php index.html;
|
||||||
|
#
|
||||||
|
# access_log /var/log/nginx/${host/_/__}_access.log;
|
||||||
|
# error_log /var/log/nginx/${host/_/__}_error.log;
|
||||||
|
#
|
||||||
|
# client_max_body_size 25m;
|
||||||
|
#
|
||||||
|
# location / { try_files \$uri \$uri/ /index.php?\$query_string; }
|
||||||
|
#
|
||||||
|
# location ~ \.php\$ {
|
||||||
|
# include snippets/fastcgi-php.conf;
|
||||||
|
# ${FASTCGI_PASS}
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# location ^~ /livewire/ { try_files \$uri /index.php?\$query_string; }
|
||||||
|
# location ~* \.(jpg|jpeg|png|gif|css|js|ico|svg)\$ { expires 30d; access_log off; }
|
||||||
|
#
|
||||||
|
# # WebSocket: Laravel Reverb
|
||||||
|
# location /ws/ {
|
||||||
|
# proxy_http_version 1.1;
|
||||||
|
# proxy_set_header Upgrade \$http_upgrade;
|
||||||
|
# proxy_set_header Connection "Upgrade";
|
||||||
|
# proxy_set_header Host \$host;
|
||||||
|
# proxy_read_timeout 60s;
|
||||||
|
# proxy_send_timeout 60s;
|
||||||
|
# proxy_pass http://127.0.0.1:8080/;
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# # Reverb HTTP API
|
||||||
|
# location /apps/ {
|
||||||
|
# proxy_http_version 1.1;
|
||||||
|
# proxy_set_header Host \$host;
|
||||||
|
# proxy_read_timeout 60s;
|
||||||
|
# proxy_send_timeout 60s;
|
||||||
|
# proxy_pass http://127.0.0.1:8080/apps/;
|
||||||
|
# }
|
||||||
|
#CONF
|
||||||
|
#
|
||||||
|
# if [[ "${DEV_MODE}" = "1" ]]; then
|
||||||
|
# cat >> "$outfile" <<'CONF'
|
||||||
|
# # DEV: Vite-Proxy (HMR)
|
||||||
|
# location ^~ /@vite/ { proxy_pass http://127.0.0.1:5173/@vite/; proxy_set_header Host $host; }
|
||||||
|
# location ^~ /node_modules/ { proxy_pass http://127.0.0.1:5173/node_modules/; proxy_set_header Host $host; }
|
||||||
|
# location ^~ /resources/ { proxy_pass http://127.0.0.1:5173/resources/; proxy_set_header Host $host; }
|
||||||
|
#CONF
|
||||||
|
# fi
|
||||||
|
#
|
||||||
|
# echo "}" >> "$outfile"
|
||||||
|
#}
|
||||||
|
|
||||||
|
# $1=host, $2=outfile, $3=default_flag (default|nodefault)
|
||||||
|
build_site_http_only(){
|
||||||
|
local host="$1" outfile="$2" def_flag="${3:-default}"
|
||||||
|
|
||||||
# DEV: IP-Zugriff ohne Hostname → default_server + server_name _
|
|
||||||
local def=""
|
local def=""
|
||||||
if [[ "${DEV_MODE}" = "1" ]]; then
|
if [[ "${DEV_MODE}" = "1" && "${def_flag}" = "default" ]]; then
|
||||||
def=" default_server"
|
def=" default_server"
|
||||||
host="_"
|
|
||||||
fi
|
fi
|
||||||
[[ -z "${host}" || "${host}" = "_" ]] && host="_"
|
[[ -z "${host}" || "${host}" = "_" ]] && host="_"
|
||||||
|
|
||||||
|
|
@ -133,7 +207,6 @@ server {
|
||||||
listen [::]:80${def};
|
listen [::]:80${def};
|
||||||
server_name ${host};
|
server_name ${host};
|
||||||
|
|
||||||
# ACME HTTP-01 (optional; meist übernimmt das der Proxy)
|
|
||||||
location ^~ /.well-known/acme-challenge/ {
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
root ${ACME_ROOT};
|
root ${ACME_ROOT};
|
||||||
allow all;
|
allow all;
|
||||||
|
|
@ -339,9 +412,9 @@ WEBMAIL_SITE="/etc/nginx/sites-available/webmail-mailwolt.conf"
|
||||||
|
|
||||||
# UI & Webmail …
|
# UI & Webmail …
|
||||||
if [[ "${DEV_MODE}" = "1" ]]; then
|
if [[ "${DEV_MODE}" = "1" ]]; then
|
||||||
# DEV: per IP erreichbar → Catch-All („_“) und HTTP-only
|
# UI = Catch-All + default_server, Webmail = Catch-All ohne default
|
||||||
build_site_http_only "_" "$UI_SITE"
|
build_site_http_only "_" "$UI_SITE" "default"
|
||||||
build_site_http_only "_" "$WEBMAIL_SITE"
|
build_site_http_only "_" "$WEBMAIL_SITE" "nodefault"
|
||||||
else
|
else
|
||||||
if [[ "${PROXY_MODE:-0}" -eq 1 ]]; then
|
if [[ "${PROXY_MODE:-0}" -eq 1 ]]; then
|
||||||
build_site_http_only "$UI_HOST" "$UI_SITE"
|
build_site_http_only "$UI_HOST" "$UI_SITE"
|
||||||
|
|
@ -351,6 +424,19 @@ else
|
||||||
build_site_tls "$WEBMAIL_HOST" "/etc/ssl/webmail" "$WEBMAIL_SITE"
|
build_site_tls "$WEBMAIL_HOST" "/etc/ssl/webmail" "$WEBMAIL_SITE"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
#if [[ "${DEV_MODE}" = "1" ]]; then
|
||||||
|
# # DEV: per IP erreichbar → Catch-All („_“) und HTTP-only
|
||||||
|
# build_site_http_only "_" "$UI_SITE"
|
||||||
|
# build_site_http_only "_" "$WEBMAIL_SITE"
|
||||||
|
#else
|
||||||
|
# if [[ "${PROXY_MODE:-0}" -eq 1 ]]; then
|
||||||
|
# build_site_http_only "$UI_HOST" "$UI_SITE"
|
||||||
|
# build_site_http_only "$WEBMAIL_HOST" "$WEBMAIL_SITE"
|
||||||
|
# else
|
||||||
|
# build_site_tls "$UI_HOST" "/etc/ssl/ui" "$UI_SITE"
|
||||||
|
# build_site_tls "$WEBMAIL_HOST" "/etc/ssl/webmail" "$WEBMAIL_SITE"
|
||||||
|
# fi
|
||||||
|
#fi
|
||||||
|
|
||||||
# MX: **immer** ACME-only (kein Laravel dahinter)
|
# MX: **immer** ACME-only (kein Laravel dahinter)
|
||||||
build_site_acme_only "${MAIL_HOSTNAME}" "$MX_SITE"
|
build_site_acme_only "${MAIL_HOSTNAME}" "$MX_SITE"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue