Skip to content

Commit

Permalink
Merge branch 'hotfix/2024-12-20_drop_bad_hosts'
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Dec 20, 2024
2 parents d417a82 + 40cadff commit 7d09004
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions deploy/nginx/production/doaj
Original file line number Diff line number Diff line change
Expand Up @@ -305,3 +305,20 @@ server {
ssl_certificate /etc/letsencrypt/live/doajes.cottagelabs.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/doajes.cottagelabs.com/privkey.pem;
}

# Catch and throw away any requests to an unknown host
server {
listen 80 default_server;
return 444;
}

server {
listen [::]:443 ssl http2 default_server;
listen 443 ssl http2 default_server;
server_name _;

ssl_certificate /etc/letsencrypt/live/doaj.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/doaj.org/privkey.pem;

return 444;
}
17 changes: 17 additions & 0 deletions deploy/nginx/test/doaj
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,20 @@ server {
proxy_pass http://doaj_index;
}
}

# Catch and throw away any requests to an unknown host
server {
listen 80 default_server;
return 444;
}

server {
listen [::]:443 ssl http2 default_server;
listen 443 ssl http2 default_server;
server_name _;

ssl_certificate /etc/letsencrypt/live/testdoaj.cottagelabs.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/testdoaj.cottagelabs.com/privkey.pem;

return 444;
}

0 comments on commit 7d09004

Please sign in to comment.