Add host name check in nginx conf

This commit is contained in:
Nathan Chapman 2023-07-14 23:04:41 -06:00
parent 9108c7ea1a
commit cf4a1e5ec7

View File

@ -19,6 +19,10 @@ server {
listen [::]:443 ssl http2;
server_name ptcoffee.com www.ptcoffee.com;
if ($http_host !~* ^(ptcoffee.com|www.ptcoffee.com)$ ) {
return 444;
}
# SSL
ssl_certificate /etc/letsencrypt/live/ptcoffee.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ptcoffee.com/privkey.pem;