From 2987e57c8cce4db23651034aea94ecdc0ec1a06a Mon Sep 17 00:00:00 2001 From: Clifton Palmer Date: Sun, 23 Jan 2022 13:04:43 -0600 Subject: [PATCH] Catch-all server block --- nginx.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nginx.conf b/nginx.conf index ffc401d..50518ed 100644 --- a/nginx.conf +++ b/nginx.conf @@ -34,4 +34,18 @@ http { proxy_set_header Host $host; } } + + # catch-all server for both http and https + server { + listen *:80 default_server; + listen *:443 default_server; + server_name _; + + # Your SSL configuration + #ssl_certificate /etc/nginx/ssl/example.com/ssl-bundle.crt; + #ssl_certificate_key /etc/nginx/ssl/example.com/example.com.key; + + # Redirect to canonical site + #rewrite ^/(.*)$ http://example.com/$1 permanent; + } } -- 2.47.2