diff --git a/config_examples/nginx.conf.example b/config_examples/nginx.conf.example index 8c57626c..37c56e38 100644 --- a/config_examples/nginx.conf.example +++ b/config_examples/nginx.conf.example @@ -6,13 +6,20 @@ upstream crafty { } server { - listen 80 default_server; + listen 80; + server_name ; + if ($host !~* ^\.\.com$ ) { + return 444; + } rewrite ^(.*) https://$host$1 permanent; } server { listen 443 ssl; server_name ; + if ($host !~* ^\.\.com$ ) { + return 444; + } ssl_certificate ; ssl_certificate_key ; location / {