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; + } +}