1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

hide nginx version an OS information for better privacy.

This commit is contained in:
ikarus 2015-02-01 20:13:03 +01:00
parent 82e752395b
commit 3a09b04786

View File

@ -7,6 +7,11 @@ server {
server_name $HOSTNAME; server_name $HOSTNAME;
root /tmp/invalid-path-nothing-here; 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 # Redirect using the 'return' directive and the built-in
# variable '$request_uri' to avoid any capturing, matching # variable '$request_uri' to avoid any capturing, matching
# or evaluation of regular expressions. # or evaluation of regular expressions.
@ -20,6 +25,10 @@ server {
server_name $HOSTNAME; 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 $SSL_CERTIFICATE;
ssl_certificate_key $SSL_KEY; ssl_certificate_key $SSL_KEY;
include /etc/nginx/nginx-ssl.conf; include /etc/nginx/nginx-ssl.conf;