From 03d2de24aaaf8e1d23d77e6fcb8a5540b1938d43 Mon Sep 17 00:00:00 2001 From: Edwin Lyon <53972157+practical-engelbart@users.noreply.github.com> Date: Fri, 22 Jan 2021 03:42:44 -0800 Subject: [PATCH] Create default.conf --- nginx/default.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 nginx/default.conf diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..d4d5b49 --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,14 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + server_name _; + root /dev/null; + + if ($host !~ ^(autoconfig.thelyoncompany.com|autodiscover.thelyoncompany.com|webmail.thelyoncompany.com|email.thelyoncompany.com|matrix.thelyoncompany.com|thelyoncompany.com)$ ) { + return 444; + } + + location / { + return 301 https://host$request_uri; + } +}