From: Clifton Palmer Date: Sun, 23 Jan 2022 19:04:43 +0000 (-0600) Subject: Catch-all server block X-Git-Url: http://git.purplebirdman.com/proxy.git/commitdiff_plain/2987e57c8cce4db23651034aea94ecdc0ec1a06a?hp=c0018a0abf5efefba0f1a33e2e020dcf35d88b77 Catch-all server block --- 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; + } }