services: letsencrypt: 404 on unknown subdomains
This commit is contained in:
parent
a25b816bdb
commit
8f051ad319
|
@ -8,11 +8,24 @@ server {
|
|||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
# main server block
|
||||
# Default to showing 404 on unknown subdomain or missing host header
|
||||
server {
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
|
||||
server_name _;
|
||||
|
||||
# all ssl related config moved to ssl.conf
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
return 404;
|
||||
}
|
||||
|
||||
# main server block
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
root /config/www/hugo;
|
||||
index index.html;
|
||||
|
||||
|
|
Reference in a new issue