feat: ship default catch-all site on fresh apt install

Fresh apt installs now drop a catch-all server block at `/etc/nginx/conf.d/00-default-vhost.conf` that uses `ssl_reject_handshake on` and `return 444` to drop requests with unknown Host headers. Conflicting upstream nginx default vhosts are renamed to `*.dokku-disabled` rather than deleted, preserving any local edits. The new `dokku/install_default_site` debconf flag opts out of the install. Upgrades leave existing nginx config untouched.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-27 02:55:40 -04:00
parent a4f26a356a
commit d7c88ae298
7 changed files with 246 additions and 32 deletions

View File

@@ -0,0 +1,15 @@
# Catch-all server block for requests with unknown Host headers.
# Installed on fresh apt installs of dokku; safe to edit.
# See /etc/nginx/conf.d/dokku.conf for the per-app server blocks.
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _;
access_log off;
ssl_reject_handshake on;
return 444;
}