Skip to content

Commit

Permalink
Merge pull request #176 from Moody-Tunes/refactor_mtdj_nginx_config
Browse files Browse the repository at this point in the history
Refactor mtdj nginx config
  • Loading branch information
nickdibari authored Jun 20, 2021
2 parents 402fd5d + c30e01d commit 652c0fe
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions roles/nginx/templates/mtdj/nginx.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ upstream app_server {
}

server {
listen 443 ssl http2;
server_name {{ app_hostname }} admin.{{ app_hostname }};
listen 443 default_server ssl;
server_name _ "" default_server;
access_log /var/log/nginx/access.log access;

# Deny invalid Host headers
if ($host !~* ^({{ app_hostname }}|admin.{{ app_hostname }})$) {
return 444;
}
return 444;
}

if ($request_method !~ ^(GET|POST|DELETE|HEAD|PATCH)$) {
return 405;
}
server {
listen 443 ssl http2;
server_name {{ app_hostname }} admin.{{ app_hostname }};
access_log /var/log/nginx/access.log access;

keepalive_timeout 5;

Expand Down

0 comments on commit 652c0fe

Please sign in to comment.