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:
15
plugins/nginx-vhosts/templates/default-site.conf
Normal file
15
plugins/nginx-vhosts/templates/default-site.conf
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user