Block all non-matching domain requests
This commit is contained in:
@@ -1,8 +1,20 @@
|
|||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
listen 443 ssl default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
ssl_certificate /etc/ssl/certs/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/ssl/certs/privkey.pem;
|
||||||
|
include /etc/ssl/conf/options-ssl-nginx.conf;
|
||||||
|
ssl_dhparam /etc/ssl/conf/ssl-dhparams.pem;
|
||||||
|
|
||||||
|
return 444;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name unluckiest.naaturel.be www.unluckiest.naaturel.be;
|
server_name unluckiest.naaturel.be www.unluckiest.naaturel.be;
|
||||||
|
|
||||||
# Redirect all HTTP requests to HTTPS
|
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,4 +48,4 @@ server {
|
|||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_cache_bypass $http_upgrade;
|
proxy_cache_bypass $http_upgrade;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user