From ab7f9f11615d351d86e89f5d50e831e2db8335c4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 3 Jan 2015 21:41:18 -0500 Subject: [PATCH] Move `server_tokens off` to the global nginx conf --- plugins/nginx-vhosts/install | 1 + plugins/nginx-vhosts/templates/nginx.conf | 1 - plugins/nginx-vhosts/templates/nginx.ssl.conf | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index 9e30c5359..a2dfc49d6 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -44,6 +44,7 @@ events { } http { + server_tokens off; sendfile on; tcp_nopush on; tcp_nodelay on; diff --git a/plugins/nginx-vhosts/templates/nginx.conf b/plugins/nginx-vhosts/templates/nginx.conf index 06b12ac56..8ed426275 100644 --- a/plugins/nginx-vhosts/templates/nginx.conf +++ b/plugins/nginx-vhosts/templates/nginx.conf @@ -2,7 +2,6 @@ server { listen [::]:80; listen 80; server_name $NOSSL_SERVER_NAME; - server_tokens off; location / { proxy_pass http://$APP; proxy_http_version 1.1; diff --git a/plugins/nginx-vhosts/templates/nginx.ssl.conf b/plugins/nginx-vhosts/templates/nginx.ssl.conf index 53164b353..5cde7484a 100644 --- a/plugins/nginx-vhosts/templates/nginx.ssl.conf +++ b/plugins/nginx-vhosts/templates/nginx.ssl.conf @@ -2,7 +2,6 @@ server { listen [::]:80; listen 80; server_name $NOSSL_SERVER_NAME; - server_tokens off; return 301 https://$SSL_SERVER_NAME\$request_uri; } @@ -10,7 +9,6 @@ server { listen [::]:443 ssl spdy; listen 443 ssl spdy; server_name $SSL_SERVER_NAME; - server_tokens off; $SSL_DIRECTIVES keepalive_timeout 70;