From 3a09b0478617c248a7fb11ad41adb48e5ce7b15d Mon Sep 17 00:00:00 2001 From: ikarus Date: Sun, 1 Feb 2015 20:13:03 +0100 Subject: [PATCH] hide nginx version an OS information for better privacy. --- conf/nginx.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 0ca2526..6dd3504 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,6 +7,11 @@ server { server_name $HOSTNAME; root /tmp/invalid-path-nothing-here; + + # Improve privacy: Hide version an OS information on + # error pages and in the "Server" HTTP-Header. + server_tokens off; + # Redirect using the 'return' directive and the built-in # variable '$request_uri' to avoid any capturing, matching # or evaluation of regular expressions. @@ -20,6 +25,10 @@ server { server_name $HOSTNAME; + # Improve privacy: Hide version an OS information on + # error pages and in the "Server" HTTP-Header. + server_tokens off; + ssl_certificate $SSL_CERTIFICATE; ssl_certificate_key $SSL_KEY; include /etc/nginx/nginx-ssl.conf;